swordDamage System

To work with the damage system, pay attention to the DamageImpact class.

DamageImpact is an abstract component that serves as a base for handling reactions to damage and death events. It connects an entity’s health model to gameplay or visual responses, allowing derived classes to define custom behavior when damage is received or when the entity dies.

All scripts related to the damage system can be found here:

Built-in Damage Implementations

The project includes several ready-to-use implementations of DamageImpact, designed to handle damage reactions for different entity types:

  • PlayerDamageImpact — handles player damage feedback, including visual and audio reactions, UI updates, and death processing.

  • EnemyDamageImpact — manages damage responses for standard enemies, such as hit feedback, reward distribution, and transition to the death state.

  • TentacleDamageImpact — a specialized damage handler for tentacle-type enemies, providing damage feedback, reward handling, and death logic.

circle-info

To learn how to add a damage system to a new unit, see here: [link]

Last updated