public PlayerShip(int x, int y)
 {
     stateMachine = new PlayerShipStateMachine();
     stateMachine.Create(this);
     flyingSp        = new Sprite("player_flying");
     dyingSp         = new Sprite("player_flying_dying", 3, 0.5f);
     box             = new Rectangle(x, y, flyingSp.Width, flyingSp.Height);
     moveUp          = 0;
     moveDown        = 0;
     moveRight       = 0;
     moveLeft        = 0;
     moveHorizontal  = 0;
     moveVertical    = 0;
     moveSpeed       = 1;
     life            = 3;
     weaponType      = WeaponType.Ship;
     canShoot        = true;
     shootCooldown   = 3;
     shootTimer      = new Timer();
     canTakeDmg      = true;
     takeDmgCooldown = 2;
     takeDmgTimer    = new Timer();
     flicking        = false;
     flickCounter    = 0;
     render          = true;
 }
 public override void Create(PlayerShip player, PlayerShipStateMachine stateMachine)
 {
     this.player       = player;
     this.stateMachine = player.stateMachine;
     timer             = new Timer();
     timeToRevive      = 3;
 }
Пример #3
0
 public override void Create(PlayerShip player, PlayerShipStateMachine stateMachine)
 {
     this.player       = player;
     this.stateMachine = player.stateMachine;
 }