public static AlienState GetState(State state) { AlienMan pAlienMan = AlienMan.PrivInstance(); Debug.Assert(pAlienMan != null); AlienState pAlienState = null; switch (state) { case AlienMan.State.Ready: pAlienState = pAlienMan.pStateReady; break; case AlienMan.State.BombFlying: pAlienState = pAlienMan.pStateBombFlying; break; case AlienMan.State.End: pAlienState = pAlienMan.pStateEnd; break; default: Debug.Assert(false); break; } return(pAlienState); }
public static AlienState GetState(AlienMan.State state) { //ensure call Create() first AlienMan pMan = AlienMan.GetInstance(); Debug.Assert(pMan != null); AlienState pAlienState = null; switch (state) { case AlienMan.State.Ready: pAlienState = pMan.pStateReady; break; case AlienMan.State.BombDroping: pAlienState = pMan.pStateBombDroping; break; default: Debug.Assert(false); break; } return(pAlienState); }
override public void SetState(AlienMan.State inState) { this.state = AlienMan.GetState(inState); }