private void SpawnBulletType3() { Bullet bullet = BulletFactory.CreateNew(); bullet.CurrentState = Bullet.VariableState.Bullet3; bullet.Position += this.Position + this.RotationMatrix.Up * 25; bullet.RotationZ = this.RotationZ; bullet.Velocity = this.RotationMatrix.Up * bullet.MovementSpeed; }
private void SpawnBulletType4() { Bullet bullet1 = BulletFactory.CreateNew(); bullet1.CurrentState = Bullet.VariableState.Bullet4; bullet1.Position += this.Position + this.RotationMatrix.Up * 25; bullet1.RotationZ = this.RotationZ; bullet1.Velocity = this.RotationMatrix.Up * bullet1.MovementSpeed * System.Convert.ToSingle(0.85); Bullet bullet2 = BulletFactory.CreateNew(); bullet2.CurrentState = Bullet.VariableState.Bullet4; bullet2.Position += this.RotationMatrix.Left * 25 + this.Position + this.RotationMatrix.Up * 13; bullet2.RotationZ = this.RotationZ + System.Convert.ToSingle(Math.PI / 4); bullet2.Velocity = this.RotationMatrix.Up * bullet2.MovementSpeed / 2 + this.RotationMatrix.Left * bullet2.MovementSpeed / 2; Bullet bullet3 = BulletFactory.CreateNew(); bullet3.CurrentState = Bullet.VariableState.Bullet4; bullet3.Position += this.RotationMatrix.Right * 25 + this.Position + this.RotationMatrix.Up * 13; bullet3.RotationZ = this.RotationZ - System.Convert.ToSingle(Math.PI / 4); bullet3.Velocity = this.RotationMatrix.Up * bullet3.MovementSpeed / 2 + this.RotationMatrix.Right * bullet3.MovementSpeed / 2; Bullet bullet4 = BulletFactory.CreateNew(); bullet4.CurrentState = Bullet.VariableState.Bullet4; bullet4.Position += this.RotationMatrix.Up * 25 + this.Position - this.RotationMatrix.Right * 15; bullet4.RotationZ = this.RotationZ + System.Convert.ToSingle(Math.PI / 8); bullet4.Velocity = this.RotationMatrix.Up * bullet4.MovementSpeed * System.Convert.ToSingle(0.75) + this.RotationMatrix.Left * bullet4.MovementSpeed * System.Convert.ToSingle(0.25); Bullet bullet5 = BulletFactory.CreateNew(); bullet5.CurrentState = Bullet.VariableState.Bullet4; bullet5.Position += this.RotationMatrix.Up * 25 + this.Position + this.RotationMatrix.Right * 15; bullet5.RotationZ = this.RotationZ - System.Convert.ToSingle(Math.PI / 8); bullet5.Velocity = this.RotationMatrix.Up * bullet5.MovementSpeed * System.Convert.ToSingle(0.75) + this.RotationMatrix.Right * bullet5.MovementSpeed * System.Convert.ToSingle(0.25); }
private void SpawnBulletType1() { Bullet bullet1 = BulletFactory.CreateNew(); bullet1.CurrentState = Bullet.VariableState.Bullet1; bullet1.Position += this.Position + this.RotationMatrix.Up * 25; bullet1.Position += this.RotationMatrix.Right * 15; bullet1.RotationZ = this.RotationZ; bullet1.Velocity = this.RotationMatrix.Up * bullet1.MovementSpeed; Bullet bullet2 = BulletFactory.CreateNew(); bullet2.CurrentState = Bullet.VariableState.Bullet1; bullet2.Position += this.Position + this.RotationMatrix.Up * 25; bullet2.Position -= this.RotationMatrix.Right * 15; bullet2.RotationZ = this.RotationZ; bullet2.Velocity = this.RotationMatrix.Up * bullet2.MovementSpeed; }
private void SpawnBullet() { Bullet bullet = BulletFactory.CreateNew(); if (CurrentState.Equals(EnemySpinner.VariableState.DarkGrey)) { bullet.CurrentState = Bullet.VariableState.Bullet5; } else if (CurrentState.Equals(EnemySpinner.VariableState.Metallic)) { bullet.CurrentState = Bullet.VariableState.Bullet6; } else if (CurrentState.Equals(EnemySpinner.VariableState.Purple)) { bullet.CurrentState = Bullet.VariableState.Bullet7; } bullet.Position = this.Position + this.RotationMatrix.Up * 25; bullet.RotationZ = this.RotationZ; bullet.Velocity = this.RotationMatrix.Up * bullet.MovementSpeed; }
private void SpawnBulletType3() { int i = 1; if (leftBullet) { i = -1; leftBullet = false; } else { leftBullet = true; } Bullet bullet = BulletFactory.CreateNew(); bullet.CurrentState = Bullet.VariableState.Bullet7; bullet.Position += this.Position + this.RotationMatrix.Up * 25; bullet.Position += this.RotationMatrix.Right * 5 * i; bullet.RotationZ = this.RotationZ; bullet.Velocity = this.RotationMatrix.Up * bullet.MovementSpeed; }
private void SpawnBulletType2() { Bullet bullet1 = BulletFactory.CreateNew(); bullet1.CurrentState = Bullet.VariableState.Bullet2; bullet1.Position += this.Position + this.RotationMatrix.Up * 25; bullet1.RotationZ = this.RotationZ; bullet1.Velocity = this.RotationMatrix.Up * bullet1.MovementSpeed; Bullet bullet2 = BulletFactory.CreateNew(); bullet2.CurrentState = Bullet.VariableState.Bullet2; bullet2.Position += this.Position + this.RotationMatrix.Left * 25; bullet2.RotationZ = this.RotationZ + System.Convert.ToSingle(Math.PI / 2); bullet2.Velocity = this.RotationMatrix.Left * bullet2.MovementSpeed; Bullet bullet3 = BulletFactory.CreateNew(); bullet3.CurrentState = Bullet.VariableState.Bullet2; bullet3.Position += this.Position + this.RotationMatrix.Right * 25; bullet3.RotationZ = this.RotationZ - System.Convert.ToSingle(Math.PI / 2); bullet3.Velocity = this.RotationMatrix.Right * bullet3.MovementSpeed; }