private ShipManager() { // Store the states this.pStateReady = new ShipStateReady(); this.pStateMissileFlying = new ShipStateMissileFlying(); this.pStateEnd = new ShipStateEnd(); // set active this.pCurrentShip = null; this.pMissile = null; }
private ShipMan() { // Store the states this.pStateReady = new ShipStateReady(); this.pStateMissileFlying = new ShipStateMissileFlying(); this.pStateEnd = new ShipStateEnd(); this.pShipStateMoveBoth = new ShipStateMoveBoth(); this.pShipStateMoveLeft = new ShipStateMoveLeft(); this.pShipStateMoveRight = new ShipStateMoveRight(); // set active this.pShip = null; this.pMissile = null; }
//---------------------------------------------------------------------------------- // Constructor //---------------------------------------------------------------------------------- private ShipMan() { // Store the states this.pStateReady = new ShipStateReady(); this.pStateMissileFlying = new ShipStateMissileFlying(); this.pStateDead = new ShipStateDead(); this.pMoveLeftRightState = new ShipMoveLeftRightState(); this.pMoveLeftState = new ShipMoveLeftState(); this.pMoveRightState = new ShipMoveRightState(); // set active this.pShip = null; this.pMissile = null; }
private ShipManager() { // Store the states this.pStateReady = new ShipStateReady(); this.pStateMissileFlying = new ShipMissileFlyingState(); this.pStateDead = new ShipDeadState(); this.pStateStopLeft = new ShipStopLeftState(); this.pStateStopRight = new ShipStopRightState(); this.pStateStopLeftMissileFlying = new ShipStopLeftMissileFlyingState(); this.pStateStopRightMissileFlying = new ShipStopRightMissileFlyingState(); // set active pShip = null; pMissile = null; }
private ShipMan() { this.pStateReady = new ShipStateReady(); this.pStateMissileFlying = new ShipStateMissileFlying(); this.pStateEnd = new ShipStateEnd(); this.pNoLeftState = new NoLeftState(); this.pNoRightState = new NoRightState(); this.pFreeMoveState = new FreeMoveState(); this.pNoMoveState = new NoMoveState(); this.poShip = null; this.pMissile = null; this.lives = 3; }