// Initialize the player public void Initialize(Animation animation, Vector2 position) { PlayerAnimation = animation; // Set the starting position of the player around the middle of the screen and to the back PlayerAnimation.Position = position; // Set the player to be active Alive = true; // Set the player health Health = 150; }
// Initialize the player public void Initialize(Animation animation, Vector2 position, int inflictDmg, float angle, int speed, Player owner, SoundEffect explosionEffect) { MissleAnimation = animation; // Set the starting position of the player around the middle of the screen and to the back MissleAnimation.Position = position; // Set the player to be active Alive = true; MissleAnimation.Angle = angle; // Set the player health RemoveValue = inflictDmg; Speed = speed; this.Owner = owner; this.MissleEffect = explosionEffect; }