public PlayerStateStandby(PlayerShip newContext) : base(newContext) { this.strMoveLeft = new PlayerStrategyNone(); this.strMoveRight = new PlayerStrategyNone(); this.strShoot = new PlayerStrategyNone(); }
public PlayerStateActive(PlayerShip newContext) : base(newContext) { this.strMoveLeft = new PlayerStrategyMoveLeft(this); this.strMoveRight = new PlayerStrategyMoveRight(this); this.strShoot = new PlayerStrategyShoot(this); }
public PlayerStateNoAmmo(PlayerShip newContext) : base(newContext) { this.strMoveLeft = new PlayerStrategyMoveLeft(this); this.strMoveRight = new PlayerStrategyMoveRight(this); this.strShoot = new PlayerStrategyNone(); }
public PlayerStateDead(PlayerShip newContext) : base(newContext) { this.strMoveLeft = new PlayerStrategyNone(); this.strMoveRight = new PlayerStrategyNone(); this.strShoot = new PlayerStrategyNone(); this.timedEvent = null; this.deathSound = AudioSourceManager.Self.Find(AudioSource.Name.DeathPlayer); }
// // Methods // public void SetContext(PlayerShip newContext) { this.context = newContext; this.OnContextChange(); }
public PlayerState(PlayerShip newContext) { this.context = newContext; }