public void LoadContent(ContentManager content) { PlayerProjectiles.LoadContent(content); mShipdata = content.Load <ShipData>("PlayerShip"); image = content.Load <Texture2D>(mShipdata.spriteName); playerObject = new AnimatedObject(image, image.Width, mShipdata.center, false, 0.1f, new Vector2(100, 100)); Max_Speed = mShipdata.maxSpeed; Max_Speed_Squared = Max_Speed * Max_Speed; }
public void LoadContent(ContentManager content) { EnemyProjectiles.LoadContent(content); mShipdata = content.Load <ShipData>("EnemyShip2"); image = content.Load <Texture2D>(mShipdata.spriteName); Velocity = Vector2.Zero; RandomizeMovement(); enemyObject = new AnimatedObject(image, image.Width, mShipdata.center, false, 0.1f, Position); Max_Speed = mShipdata.maxSpeed; Max_Speed_Squared = Max_Speed * Max_Speed; shotCooldown = mShipdata.shotCooldown; }
public Explosion(Texture2D texture, int width, Vector2 initialPosition, Vector2 initialVelocity) { Animation = new AnimatedObject(texture, width, new Vector2(width / 2, texture.Height / 2), true, 0.05f, initialPosition); Velocity = initialVelocity; active = true; }
public EnemyProjectile(Texture2D texture, int width, Vector2 initialPosition, Vector2 initialVelocity) { Animation = new AnimatedObject(texture, width, new Vector2(width / 2, texture.Height / 2), true, 0.1f, initialPosition); Velocity = initialVelocity; }