Search Results for

    Show / Hide Table of Contents

    Class DamageReceiver

    Abstract class that implements the IDamagable interface and inherits from MonoBehaviour. This class serves as a base for any object that can receive damage, such as players or entities.

    Inheritance
    System.Object
    DamageReceiver
    Implements
    IDamagable
    Namespace: CatchIo.Runtime.Damages
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class DamageReceiver : HurtBox, IDamagable

    Properties

    NetworkPlayer

    The network player associated with this object, used to identify if the damage target is the local player. The setter is protected to allow modification only within this class or its derived classes.

    Declaration
    public Player NetworkPlayer { get; protected set; }
    Property Value
    Type Description
    Player

    Methods

    TakeDamage(IDamage, Int32)

    Abstract method to apply direct damage to the object. Derived classes must implement how the object handles this direct damage.

    Declaration
    public abstract void TakeDamage(IDamage damage, int attackerViewID)
    Parameters
    Type Name Description
    IDamage damage

    An instance of IDamage containing information about the type and amount of damage dealt.

    System.Int32 attackerViewID

    TakeDOTDamage(DOTDamage, Int32)

    Abstract method to apply damage-over-time (DOT) to the object. Derived classes must implement how the object handles this DOT damage.

    Declaration
    public abstract void TakeDOTDamage(DOTDamage dotDamage, int attackerViewID)
    Parameters
    Type Name Description
    DOTDamage dotDamage

    An instance of DOTDamage containing information about the damage per tick, duration, and other DOT details.

    System.Int32 attackerViewID

    Implements

    IDamagable
    In This Article
    Back to top ©Team STEP, All Rights Reserved.