private void Start() { m_assetloader = new XAssetLoader(); m_currState = m_dictStates[EnumGameAppState.None]; m_currStateEnum = EnumGameAppState.None; m_nextStateEnum = EnumGameAppState.None; OnStart(); }
public void Tick(float elapsedTime) { foreach (var node in CurrScenes) { node.scene.TickScene(elapsedTime); } if (m_currStateEnum != m_nextStateEnum) { var temp = m_nextStateEnum; m_currState.OnLeave(); m_currState = m_dictStates[temp]; m_currState.OnEnter(); m_currStateEnum = temp; } m_currState.OnTick(elapsedTime); }