예제 #1
0
        public static ShipShootState GetShootState(ShootState state)
        {
            ShipManager pShipMan = ShipManager.PrivInstance();

            Debug.Assert(pShipMan != null);

            ShipShootState pShipShootState = null;

            switch (state)
            {
            case ShipManager.ShootState.MissileReady:
                pShipShootState = pShipMan.pMissileReadyState;
                break;

            case ShipManager.ShootState.MissileFlying:
                pShipShootState = pShipMan.pMissileFlyingState;
                break;

            case ShipManager.ShootState.Locked:
                pShipShootState = pShipMan.pMissileLockedState;
                break;
            }

            return(pShipShootState);
        }
예제 #2
0
        public static ShipShootState GetShootState(ShootState state)
        {
            ShipMan pShipMan = ShipMan.PrivInstance();

            Debug.Assert(pShipMan != null);

            ShipShootState pShipState = null;

            switch (state)
            {
            case ShipMan.ShootState.Ready:
                pShipState = pShipMan.pStateReady;
                break;

            case ShipMan.ShootState.MissileFlying:
                pShipState = pShipMan.pStateMissileFlying;
                break;

            case ShipMan.ShootState.End:
                pShipState = pShipMan.pStateEnd;
                break;

            default:
                Debug.Assert(false);
                break;
            }

            return(pShipState);
        }
예제 #3
0
        public Ship(GameObject.Name name, GameSprite.Name spriteName, float posX, float posY)
            : base(name, spriteName, ShipCategory.Type.Ship)
        {
            this.x = posX;
            this.y = posY;

            this.shipSpeed = 3.0f;
            this.state     = null;
            this.moveState = null;
        }
예제 #4
0
        public Ship(GameObject.Name name, Sprite.Name spriteName, BoxSprite.Name boxSpriteName, float posX, float posY)
            : base(name, spriteName, boxSpriteName)
        {
            this.x = posX;
            this.y = posY;

            this.speedX       = 5.0f;
            this.pMotionState = null;
            this.pShootState  = null;
        }
예제 #5
0
 // tells ship what state it should be in....
 //can it Shoot? can it move L or R?
 public void SetShootState(ShipMan.ShootState inState)
 {
     this.state = ShipMan.GetShootState(inState);
 }
예제 #6
0
 public void SetShootState(ShipManager.ShootState inState)
 {
     this.pShootState = ShipManager.GetShootState(inState);
 }