public static void ResetShip()
        {
            pShip.pProxySprite.Set(GameSprite.Name.Ship);
            pShip.ResetLocation();
            pShip.bMarkForDeath = false;

            pShip.Handle();
        }
        // Data



        // Methods
        public override void Notify()
        {
            Ship pShip = ShipMan.GetShip();

            //old way to do it
            //pShip.SetState(ShipMan.State.Ready);

            pShip.Handle();
        }
Beispiel #3
0
        public override void Execute()
        {
            // Let the gameObject deal with this...
            this.pMissile.ResetMissile();
            Ship pShip = ShipManager.GetShip();

            if (pShip.CurrentStateName != ShipManager.State.Dead)
            {
                pShip.Handle();
            }
        }
Beispiel #4
0
        public override void Execute(float deltaTime)
        {
            Missile pMissile = ShipManager.GetMissile();

            pMissile.ResetMissile();
            Ship pShip = ShipManager.GetShip();

            if (pShip.CurrentStateName != ShipManager.State.Dead)
            {
                pShip.Handle();
            }
        }
        //This is called when Missile is done flying
        public override void Notify()
        {
            Ship pShip = ShipManager.GetShip();

            // Correction... only method that changes state is Handle
            // So correct this....
            // pShip.SetState(ShipMan.State.Ready);
            if (pShip.CurrentStateName != ShipManager.State.Dead)
            {
                pShip.Handle();
            }
        }
        public override void Execute()
        {
            this.pMissile.delta = 0.0f;

            switch (this.pSubB.name)
            {
            case GameObject.Name.WallTop:
                this.pMissile.pProxySprite.Set(GameSprite.Name.MissileExplosionRed);
                TimerManager.Add(TimeEvent.Name.RemoveMissile, this.pEvent, 0.25f);
                break;

            case GameObject.Name.ShieldBrick:
                this.pMissile.pProxySprite.Set(GameSprite.Name.MissileExplosionGreen);
                TimerManager.Add(TimeEvent.Name.RemoveMissile, this.pEvent, 0.25f);
                break;

            case GameObject.Name.Missile:
                this.pMissile.pProxySprite.Set(GameSprite.Name.MissileExplosionWhite);
                TimerManager.Add(TimeEvent.Name.RemoveMissile, this.pEvent, 0.25f);
                break;

            default:

                this.pMissile.ResetMissile();
                Ship pShip = ShipManager.GetShip();
                if (pShip.CurrentStateName != ShipManager.State.Dead)
                {
                    pShip.Handle();
                }
                break;
            }

            //if (this.pSubB.name != GameObject.Name.BlueCrab && this.pSubB.name != GameObject.Name.PurpleOctopus &&
            //    this.pSubB.name != GameObject.Name.GreenSquid && this.pSubB.name != GameObject.Name.OrangeSaucer) {

            //    this.pMissile.delta = 0.0f;
            //    this.pMissile.pProxySprite.Set(GameSprite.Name.MissileExplosion);
            //    TimerManager.Add(TimeEvent.Name.RemoveMissile, this.pEvent, 0.25f);
            //}
            //else {
            //    this.pMissile.ResetMissile();
            //    Ship pShip = ShipManager.GetShip();
            //    if (pShip.CurrentStateName != ShipManager.State.Dead)
            //    {
            //        pShip.Handle();
            //    }
            //}
        }
Beispiel #7
0
        public override void Notify()
        {
            Ship pShip = ShipMan.GetShip();

            pShip.Handle();
        }