Interface IDamagable
Interface that defines a structure for an object that can receive damage. This allows objects, such as players or entities, to handle both direct damage and damage-over-time(DOT).
Namespace: CatchIo.Runtime.Damages
Assembly: cs.temp.dll.dll
Syntax
public interface IDamagable
Properties
NetworkPlayer
Refers to the current network player associated with this object in Photon-View. Used to determine if the taking damage target is the local player.
Declaration
Player NetworkPlayer { get; }
Property Value
Type | Description |
---|---|
Player |
Methods
TakeDamage(IDamage, Int32)
Applies direct damage to the object. The damage is received immediately upon calling this method.
Declaration
void TakeDamage(IDamage damage, int attackerViewID)
Parameters
Type | Name | Description |
---|---|---|
IDamage | damage | An instance of IDamage that holds information about type and amount of damage dealt. |
System.Int32 | attackerViewID |
TakeDOTDamage(DOTDamage, Int32)
Applies damage-over-time(DOT) to the object. This causes the object to take damage gradually over a specified duration.
Declaration
void TakeDOTDamage(DOTDamage dotDamage, int attackerViewID)
Parameters
Type | Name | Description |
---|---|---|
DOTDamage | dotDamage | An instance of DOTDamage that contains information about the DOT, including damage per tick and duration and etc. |
System.Int32 | attackerViewID |