Example #1
0
	public void Heal(int healAmount, MonoX healer) {
		currentAmount += healAmount;
		if (currentAmount > maxAmount) {
			currentAmount = maxAmount;
		}
		if (Healed != null) {
			Healed(healer, this);
		}
	}
Example #2
0
	public void Damage(int damageAmount, MonoX adversary) {
		if (!IsDead) {
			if (currentAmount - damageAmount <= 0) {
				Deplete(adversary);
			} else {
				currentAmount -= damageAmount;
				if (Damaged != null) {
					Damaged(adversary, this);
				}
			}
		}
	}
Example #3
0
	public void Deplete(MonoX adversary) {
		currentAmount = 0;
		if (Depleted != null) {
			Depleted(adversary, this);
		}
	}