public override void Initialize() { base.Initialize(); EngineBlaze = new EngineBlaze(ParentShip, new Vector2(0, 35), new Vector2(25, 70), "Sprites\\GameObjects\\FX\\EngineBlaze", 8, 1, 0.1f, false, true, this); EngineBlaze.LoadContent(); EngineBlaze.Initialize(); }
public override void Initialize() { base.Initialize(); RigidBody.MaxLinearVelocity = new Vector2(RigidBody.MaxLinearVelocity.X, MissileData.MaxSpeed); // If the acceleration is non-zero, we change the acceleration of the bullet. Otherwise, we set the bullet's T velocity Y component to be it's max value if (MissileData.LinearAcceleration != 0) { RigidBody.LinearAcceleration = Vector2.Add(Vector2.Zero, new Vector2(0, MissileData.LinearAcceleration)); } else { RigidBody.LinearVelocity = Vector2.Add(Vector2.Zero, new Vector2(0, MissileData.MaxSpeed)); } EngineBlaze = new EngineBlaze(this, new Vector2(0, 1.5f * Size.Y), new Vector2(Size.X, 2 * Size.Y), "Sprites\\GameObjects\\FX\\EngineBlaze", 8, 1, 0.1f, false, true, this); EngineBlaze.LoadContent(); EngineBlaze.Initialize(); Explosion = new Explosion(Vector2.Zero, new Vector2(20, 20), "Sprites\\GameObjects\\FX\\Explosion", 4, 4, 0.025f); Explosion.LoadContent(); Explosion.Initialize(); }