Exemplo n.º 1
0
 private void Awake()
 {
     stateGamePlaying = GetComponent<StateGamePlaying>();
     stateGameWon = GetComponent<StateGameWon>();
     stateGameLost = GetComponent<StateGameLost>();
     //		stateGamePlaying.SetGameManager( this );
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
    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);
 }
Exemplo n.º 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);
 }