Exemplo n.º 1
0
	public void Heal(int healAmount, MonoX healer) {
		currentAmount += healAmount;
		if (currentAmount > maxAmount) {
			currentAmount = maxAmount;
		}
		if (Healed != null) {
			Healed(healer, this);
		}
	}
Exemplo n.º 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);
				}
			}
		}
	}
Exemplo n.º 3
0
	public void Deplete(MonoX adversary) {
		currentAmount = 0;
		if (Depleted != null) {
			Depleted(adversary, this);
		}
	}