Beispiel #1
0
 public LaserBeam(Texture2D texture, Spacecraft spacecraft, float fireSpeed, float additionalAngle)
     : base(new Vector2(spacecraft.Position.X , spacecraft.Position.Y),
     new Vector2(spacecraft.Velocity.X + (float)Math.Cos(spacecraft.Rotation + additionalAngle - MathHelper.PiOver2) * fireSpeed,
         spacecraft.Velocity.Y + (float)Math.Sin(spacecraft.Rotation + additionalAngle - MathHelper.PiOver2) * fireSpeed), spacecraft.Rotation + additionalAngle, 1f)
 {
     Texture = texture;
 }
Beispiel #2
0
 public Player(Spacecraft spaceCraft,short life,KeyBatch keyBatch)
 {
     this.spaceCraft = spaceCraft;
     this.life = life;
     this.keyBatch = keyBatch;
     score = 0;
     currentWeapon = 1;//Weapon no 1
     weapon2Ammo = 0;
 }
Beispiel #3
0
 public LaserBeam(Texture2D texture, Spacecraft spacecraft,float additionalAngle)
     : this(texture, spacecraft, 250, additionalAngle)
 {
 }
Beispiel #4
0
 public LaserBeam(Texture2D texture,Spacecraft spacecraft)
     : this(texture,spacecraft,250,0)
 {
 }