Interface ICanTakeDamage
Interface to be implemented by objects which can take damage. It then may be used in simulation (in example for attacking animals).
Namespace: Eco.Simulation.Agents
Assembly: Eco.Simulation.dll
Syntax
public interface ICanTakeDamage
Methods
TryDamage(INetObject, Single, DamageSourceType)
Tries to make damage. Returns false if failed to make any damage.
Declaration
bool TryDamage(INetObject source, float damage, DamageSourceType sourceType)
Parameters
| Type | Name | Description |
|---|---|---|
| INetObject | source | |
| System.Single | damage | |
| DamageSourceType | sourceType |
Returns
| Type | Description |
|---|---|
| System.Boolean |