public static ShipState GetState(ShipMan.State state) { //ensure call Create() first ShipMan pShipMan = ShipMan.GetInstance(); Debug.Assert(pShipMan != null); ShipState pShipState = null; switch (state) { case ShipMan.State.Ready: pShipState = pShipMan.pStateReady; break; case ShipMan.State.MissileFlying: pShipState = pShipMan.pStateMissileFlying; break; case ShipMan.State.End: pShipState = pShipMan.pStateEnd; break; case ShipMan.State.Normal: pShipState = pShipMan.pStateNormal; break; case ShipMan.State.MostLeft: pShipState = pShipMan.pStateMostLeft; break; case ShipMan.State.MostRight: pShipState = pShipMan.pStateMostRight; break; case ShipMan.State.Stay: pShipState = pShipMan.pStateStay; break; default: Debug.Assert(false); break; } return(pShipState); }
public void SetMoveState(ShipMan.State inState) { this.moveState = ShipMan.GetState(inState); }
public void SetShootState(ShipMan.State inState) { this.pShootState = ShipMan.GetState(inState); }
public void setPositionState(ShipMan.State state) { this.posistionState = ShipMan.GetState(state); }
public void setState(ShipMan.State state) { this.state = ShipMan.GetState(state); }