-
-
Save mstefarov/5080366 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Xna.Framework; | |
namespace ShipGame | |
{ | |
class MiniBoss : EnemyShip | |
{ | |
public const int MaxHealth = 240; | |
public MiniBoss(string textureName, Vector2 startingPosition, int health) | |
: base(textureName, startingPosition, health) | |
{ | |
Health = 240; | |
} | |
public MiniBoss(string textureName, Vector2 startingPosition) | |
: base(textureName, startingPosition) { } | |
public override void Collide(Actor actor) | |
{ | |
// Order is important | |
actor.TakeDamage(MaxHealth/12); | |
TakeDamage(MaxHealth/12); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment