AngeliA
Search Results for

    Show / Hide Table of Contents

    Class Bullet

    An entity represent bullet from weapons that deal damage to IDamageReceiver

    Implements
    IMapItem

    Fields

    Damage

    Final damage value

    Declaration
    public readonly FrameBasedInt Damage

    Properties

    AttackCharged

    True if the attack is charged

    Declaration
    public bool AttackCharged { get; }

    AttackIndex

    Index for style of the attack from the sender

    Declaration
    public int AttackIndex { get; }

    BasicDamage

    Intrinsic damage value

    Declaration
    protected virtual int BasicDamage { get; }

    DamageType

    What extra type of damage does this bullet deal

    Declaration
    public Tag DamageType { get; set; }

    Duration

    How long can this bullet exists on stage in frame

    Declaration
    public virtual int Duration { get; }

    EnvironmentHitCount

    How many environment collider can this bullet hit without getting despawn

    Declaration
    protected virtual int EnvironmentHitCount { get; }

    EnvironmentMask

    Group of physics layers for checking environment that this bullet can react with

    Declaration
    protected virtual int EnvironmentMask { get; }

    FailbackTargetTeam

    Default team for checking attack target

    Declaration
    public int FailbackTargetTeam { get; set; }

    ReceiverHitCount

    How many target collider can this bullet hit without getting despawn

    Declaration
    protected virtual int ReceiverHitCount { get; }

    ReceiverMask

    Group of physics layers for checking target that this bullet can react with

    Declaration
    protected virtual int ReceiverMask { get; }

    RoundHitCheck

    True if the bullet check for target in a round shaped range

    Declaration
    protected virtual bool RoundHitCheck { get; }

    Sender

    This entity send the bullet

    Declaration
    public Entity Sender { get; set; }

    TargetTeam

    Team data for checking which group of target should be attack

    Declaration
    public int TargetTeam { get; }

    Methods

    BeforeDespawn(IDamageReceiver)

    This function is called before the bullet get despawn by performing damage logic

    Declaration
    protected virtual void BeforeDespawn(IDamageReceiver receiver)
    Parameters
    Type Name Description
    IDamageReceiver receiver

    The target it hits

    BeforeUpdate()

    [2/4] This function is called every frame when entity is in stage. Prioritize using this function to update physics logic.

    Declaration
    public override void BeforeUpdate()
    Overrides
    Entity.BeforeUpdate()

    EnvironmentHitCheck(out bool)

    Check for hitting any environment block

    Declaration
    protected void EnvironmentHitCheck(out bool requireSelfDestroy)
    Parameters
    Type Name Description
    bool requireSelfDestroy

    True if this bullet should be despawn

    GetDamage()

    Get the damage data using by this bullet to deal damage

    Declaration
    public Damage GetDamage()

    GroundCheck(out Color32)

    True if the bullet is touching ground

    Declaration
    public bool GroundCheck(out Color32 groundTint)

    OnActivated()

    This function is called when entity enter the stage

    Declaration
    public override void OnActivated()
    Overrides
    Entity.OnActivated()

    PerformHitEnvironment(out bool)

    This function is called when the bullet hit environment colliders

    Declaration
    protected virtual void PerformHitEnvironment(out bool requireSelfDestroy)
    Parameters
    Type Name Description
    bool requireSelfDestroy

    True if this bullet should be despawn

    PerformHitReceiver(IDamageReceiver, out bool)

    This function is called when the bullet hit IDamageReceiver

    Declaration
    protected virtual void PerformHitReceiver(IDamageReceiver receiver, out bool requireSelfDestroy)
    Parameters
    Type Name Description
    IDamageReceiver receiver

    The target it hits

    bool requireSelfDestroy

    True if this bullet should be despawn

    ReceiverHitCheck(out bool)

    Check for hitting any IDamageReceiver

    Declaration
    protected void ReceiverHitCheck(out bool requireSelfDestroy)
    Parameters
    Type Name Description
    bool requireSelfDestroy

    True if this bullet should be despawn

    Update()

    [3/4] This function is called every frame when entity is in stage. Prioritize using this function to update physics logic.

    Declaration
    public override void Update()
    Overrides
    Entity.Update()
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค