void Start()
 {
     Screen.sleepTimeout = SleepTimeout.NeverSleep;
     Instance = this;
     if (cam == null)
     {
         cam = Camera.main;
     }
     playController = GetComponent<PlayController>();
     cutsceneController = GetComponent<SpaceCutscene>();
     gameOverController = GetComponent<GameOverController>();
     InitLanguage();
     GoToCutScene();
 }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        SpaceGameController.instance = this;

        // Set callback to the intro
        player.controllable = false;
        if (showIntro == true)
        {
            introCallback = new UnityEvent();
            introCallback.AddListener(StartGame);
            intro.Show(introCallback);
        }
        else
        {
            intro.gameObject.SetActive(false);
            StartGame();
        }

        music.Play();
    }