public bool DoDamage(int damage) { Debug.Log("DAMAGES"); // Yoann je sais que c'est dur de voir ca // Mais on a plus le temps ): CurrentHealth -= damage; if (CurrentHealth <= 0) { dialogueSystem.DisplayDamagedHouseDialogue(ownerPlayer, enemyPlayer, HouseState.Destroyed); return(true); } if (((float)CurrentHealth / maxHealth) <= 0.75f && !lightlyDamagedDialogueTriggered) { dialogueSystem.DisplayDamagedHouseDialogue(ownerPlayer, enemyPlayer, HouseState.LightlyDamaged); lightlyDamagedDialogueTriggered = true; } else if (((float)CurrentHealth / maxHealth) <= 0.3f && !heavilyDamagedDialogueTriggered) { dialogueSystem.DisplayDamagedHouseDialogue(ownerPlayer, enemyPlayer, HouseState.HeavilyDamaged); heavilyDamagedDialogueTriggered = true; } return(false); }