Example #1
0
 private void NewShip()
 {
     ship = new ShipSprite(shipTileSet);
     ship.CollisionxExtent = 8; //make collision box smaller
     ship.CollisionyExtent = 8;
     ship.PositionY        = (float)this.Height / 2;
     ship.PositionX        = (float)this.Width / 2;
     ship.Velocity         = 0f;
     ship.CanCollide       = true;
     ship.Angle            = 0;
     ship.StartDelay       = 2f; //delay start for 2 seconds
     ship.AnimationSpeed   = 0f; //ship only moves from user input
     ship.Frame            = 10; //aligns ship direction to 0 radians
     sm.AddSprite(ship);
     shipSounds = Sounds.ShipAppear | Sounds.ShipHum;
 }
 private void NewShip()
 {
     ship = new ShipSprite(shipTileSet);
     ship.CollisionxExtent = 8; //make collision box smaller
     ship.CollisionyExtent = 8;
     ship.PositionY = (float)this.Height/2;
     ship.PositionX = (float)this.Width/2;
     ship.Velocity = 0f;
     ship.CanCollide = true;
     ship.Angle = 0;
     ship.StartDelay = 2f; //delay start for 2 seconds
     ship.AnimationSpeed = 0f; //ship only moves from user input
     ship.Frame = 10; //aligns ship direction to 0 radians
     sm.AddSprite(ship);
     shipSounds = Sounds.ShipAppear | Sounds.ShipHum;
 }