AngeliA
Search Results for

    Show / Hide Table of Contents

    Interface IDamageReceiver

    Interface that makes entity take damage from other

    Properties

    IgnoreDamageType

    This entity do not take damage with this tags

    Declaration
    Tag IgnoreDamageType { get; }

    IsInvincible

    True if this entity is invincible

    Declaration
    bool IsInvincible { get; }

    TakeDamageFromLevel

    True if this entity take damage when overlap with colliders from PhysicsLayer.Damage

    Declaration
    bool TakeDamageFromLevel { get; }

    Team

    Which team does this entity belongs to

    Declaration
    int Team { get; }

    Methods

    DamageAllOverlap(IRect, Damage, int, Entity, OperationMode, bool)

    Deal damage to all IDamageReceiver overlap by given range

    Declaration
    public static void DamageAllOverlap(IRect rect, Damage damage, int physicsMask = 10, Entity host = null, OperationMode mode = OperationMode.ColliderAndTrigger, bool allowMultipleDamage = true)
    Parameters
    Type Name Description
    IRect rect

    The range in global space

    int physicsMask

    Which physics layer is included

    Entity host

    Sender of this damage

    OperationMode mode

    Does this operation include collider or trigger

    bool allowMultipleDamage

    True if more than one receiver will take damage

    OnDamaged(Damage)

    This function is called when the entity takes a damage

    Declaration
    void OnDamaged(Damage damage)

    TakeDamage(Damage)

    Make this entity take the given damage. This function will call ValidDamage internally

    Declaration
    bool TakeDamage(Damage damage)
    Returns
    Type Description
    bool

    True if the damage is taken

    ValidDamage(Damage)

    True if the damage will be take by this entity

    Declaration
    bool ValidDamage(Damage damage)
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค