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