ButtonsMemoryMinigame #28

Merged
Trubkokrtek merged 11 commits from ButtonsMemoryMinigame into main 2026-06-04 21:49:48 +02:00
Showing only changes of commit 221e834226 - Show all commits

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);