Answer the question
In order to leave comments, you need to log in
When you click on the button several times, the action is performed, the details are inside. What to change?
Simple script:
public class Rand : MonoBehaviour {
int dawn;
public SpawnBox sB;
void Start()
{ }
void Update () {
if(Input.GetKey(KeyCode.Q))
{
dawn = Random.Range(0, 10);
if(dawn == 3)
{
sB.Spawn();
}
else
{
print(dawn);
}
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question