Пример #1
0
 public void TriggerMinigame(MinigameTrigger game)
 {
     if (!minigameActive)
     {
         allMinigames[Random.Range(0, allMinigames.Length)].SetActive(true);
         minigameActive = true;
         activeGame     = game;
         FindObjectOfType <PlayerController>().enabled = false;
         FindObjectOfType <PlayerController>().myCamera.gameObject.SetActive(false);
     }
 }
    private PlatformMovement platform; // Grab the platform object from the editor.

    void Start()
    {
        trigger = gameObject.GetComponent <MinigameTrigger>(); // Finds the padlock that activates the platform minigame.
    }