示例#1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#2
0
    private void Awake()
    {
        DontDestroyOnLoad(this.gameObject);

        escMenu = GameObject.FindWithTag("EscMenu")
                  .GetComponent <EscMenuView>();
    }
示例#3
0
    void Start()
    {
        CurrentState = State.Run;
        isGameOver   = false;
        Player.GetComponentInChildren <PlayerScript>().MinigameStarted += StartMinigame;
        GameStateUpdated += SwitchInterface;

        fpc = PlayerController.GetComponent <FirstPersonController>();
        fpc.LockCursor(true);

        emv = EscMenu.GetComponent <EscMenuView>();
        emv.BackButtonClicked += BackToGame;
    }