Code changes

This commit is contained in:
2026-05-24 21:50:02 +02:00
parent a4324eaf52
commit 221e834226

View File

@@ -2,6 +2,14 @@ using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public enum GameState
{
Idle,
ShowingSequance,
PlayerTurn,
GameOver
}
public class ButtonsMinigame : MonoBehaviour
{
public Light[] lights;
@@ -9,6 +17,7 @@ public class ButtonsMinigame : MonoBehaviour
public float glowDuration = 0.4f;
public float gapBetween = 0.15f;
private int playerStep = 0;
private GameState state = GameState.Idle;
private List<int> sequence = new List<int>();
void GenerateSequence()
@@ -39,6 +48,10 @@ public class ButtonsMinigame : MonoBehaviour
StartCoroutine(PlaySequence());
}
void SetState(GameState newState)
{
state = newState;
}
public void OnButtonClicked(int buttonIndex)
{
Debug.Log("Clicked : " + buttonIndex);