Esempio n. 1
0
    void Awake()
    {
        mState = eControllerState.eControllerState_CREATED;

        mDungeonView = this.gameObject.GetComponent <DungeonView>();
        if (mDungeonView == null)
        {
            mDungeonView = this.gameObject.AddComponent <DungeonView>();
        }

        mDungeonModel = this.gameObject.GetComponent <DungeonModel>();
        if (mDungeonModel == null)
        {
            mDungeonModel = this.gameObject.AddComponent <DungeonModel>();
        }

        m_questingParties = new Dictionary <string, GameObject>();
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        //  TODO aherrera : create a method for this pls.. (something like "change state")
        if (mState == eControllerState.eControllerState_READY_TO_INITIALIZE)
        {
            CreateDungeonObject();
            mState = eControllerState.eControllerState_ACTIVE;
        }

        //  TODO aherrera : don't put this here
        // 1/29     moved this block from DungeomModel.Update -- still not here?
        foreach (GameObject go in m_questingParties.Values)
        {
            PartyController pc = go.GetComponent <PartyController>();
            if (pc != null)
            {
                pc.InternalUpdate();
            }
        }
    }
Esempio n. 3
0
 public void InitializeDungeon(GameObject main_canvas)
 {
     MainCanvas = main_canvas;
     mState     = eControllerState.eControllerState_READY_TO_INITIALIZE;
 }