Function OnClick problems(buttons)
Hi, I need some help with this code, i need to spawn a mine (and it spawns), the problem is the number of mines. Not 1 not 2 , but the number of frames the button remains pressed ( 100+ for each press, sometimes 900), how can I solve this?? With the number of mines, i mean the value of the variable, not the gameObjects. Thanks
Button.gameObject.SetActive(false); NumberOfMines = NumberOfMines + 1; Instantiate(Mine, spawnpoint.transform.position, spawnpoint.transform.rotation);
Comment
Your answer
Follow this Question
Related Questions
Button Click 1 Answer
What is the best way to use buttons? 1 Answer
Help with Randomized Sprite on GUI button click 0 Answers
Get keycode of pressed button 1 Answer