Added coliders to buttons, Buttons are clickable
This commit is contained in:
@@ -8,9 +8,10 @@ public class ButtonsMinigame : MonoBehaviour
|
||||
public int round = 1;
|
||||
public float glowDuration = 0.4f;
|
||||
public float gapBetween = 0.15f;
|
||||
private int playerStep = 0;
|
||||
private List<int> sequence = new List<int>();
|
||||
|
||||
void Generatesequence()
|
||||
void GenerateSequence()
|
||||
{
|
||||
sequence.Clear();
|
||||
for (int i = 0; i < round; i++)
|
||||
@@ -20,7 +21,7 @@ public class ButtonsMinigame : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator Playsequence()
|
||||
IEnumerator PlaySequence()
|
||||
{
|
||||
for (int i = 0; i < sequence.Count; i++)
|
||||
{
|
||||
@@ -34,8 +35,13 @@ public class ButtonsMinigame : MonoBehaviour
|
||||
|
||||
void Start()
|
||||
{
|
||||
Generatesequence();
|
||||
StartCoroutine(Playsequence());
|
||||
GenerateSequence();
|
||||
StartCoroutine(PlaySequence());
|
||||
}
|
||||
|
||||
public void OnButtonClicked(int buttonIndex)
|
||||
{
|
||||
Debug.Log("Clicked : " + buttonIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user