Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     // Set as Disabled
     current.gameObject.SetActive(false);
     foreach (var m in minigames)
     {
         m.onSelect += () => StartMinigame(m.sceneName);
         m.AddListener();
     }
     minigames[0].OnSelect();
     currentMinigame = minigames[0];
 }
Пример #2
0
 void KeyboardControl()
 {
     if (Input.GetAxis("Horizontal") == -1)
     {
         if (canCommand)
         {
             index++;
             IndexNumber(index);
             canCommand = false;
         }
     }
     if (Input.GetAxis("Horizontal") == 1)
     {
         if (canCommand)
         {
             index--;
             IndexNumber(index);
             canCommand = false;
         }
     }
     currentMinigame.OnDeselect();
     minigames[index].OnSelect();
     currentMinigame = minigames[index];
 }