Beispiel #1
0
 private void Awake()
 {
     stateGamePlaying = GetComponent<StateGamePlaying>();
     stateGameWon = GetComponent<StateGameWon>();
     stateGameLost = GetComponent<StateGameLost>();
     //		stateGamePlaying.SetGameManager( this );
 }
Beispiel #2
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
     stateGamePlaying = new StateGamePlaying(this);
     stateGameWon     = new StateGameWon(this);
     stateGameLost    = new StateGameLost(this);
     stateMainMenu    = new StateMainMenu(this);
 }
    void Awake()
    {
        if (m_instance != null && m_instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            m_instance = this;
        }
        DontDestroyOnLoad(this.gameObject);

        m_stateGamePlay  = new StateGamePlay(this);
        m_stateGameWon   = new StateGameWon(this);
        m_stateGameLost  = new StateGameLost(this);
        m_stateGameIntro = new StateGameIntro(this);
        m_stateGameMenu  = new StateGameMenu(this);
    }
 private void Awake()
 {
     stateGamePlaying = new StateGamePlaying(this);
     stateGameWon = new StateGameWon(this);
     stateGameLost = new StateGameLost(this);
 }
Beispiel #5
0
    private void Awake()
    {
        DontDestroyOnLoad(this.gameObject);
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            instance = this;
        }

        stateGameIntro = new StateGameIntro(this);
        stateGameMenu = new StateGameMenu(this);
        stateGamePlaying = new StateGamePlaying(this);
        stateGameWon = new StateGameWon(this);
        stateGameLost = new StateGameLost(this);
    }
 /*------------------------------------------------------------------
  * create 3 state objects - for playing / won/ lost
  */
 private void Awake()
 {
     stateGamePlaying = new StateGamePlaying(this);
     stateGameWon     = new StateGameWon(this);
     stateGameLost    = new StateGameLost(this);
 }