AngeliA
Search Results for

    Show / Hide Table of Contents

    Interface IBumpable

    Interface that makes the entity can be bump by other (like question mark block in Mario)

    Properties

    BumpCooldown

    How many frames does it have to wait to be bump again

    Declaration
    int BumpCooldown { get; }

    BumpTransferPower

    Extra speed that gives to the rigidbody when they got transfered bump from this entity

    Declaration
    int BumpTransferPower { get; }

    FromAbove

    True if the entity can be bump from above

    Declaration
    bool FromAbove { get; }

    FromBelow

    True if the entity can be bump from below

    Declaration
    bool FromBelow { get; }

    FromLeft

    True if the entity can be bump from left

    Declaration
    bool FromLeft { get; }

    FromRight

    True if the entity can be bump from right

    Declaration
    bool FromRight { get; }

    LastBumpFrom

    Direction for the last bump of this entity

    Declaration
    Direction4 LastBumpFrom { get; set; }

    LastBumpedFrame

    Frame when the entity get it's last bump

    Declaration
    int LastBumpedFrame { get; set; }

    TransferBumpFromOther

    True if the entity take transfered bumps from other

    Declaration
    bool TransferBumpFromOther { get; }

    TransferBumpToOther

    True if the entity bump other entities when being bumped

    Declaration
    bool TransferBumpToOther { get; }

    TransferWithAttack

    True if the entity perform attack to the entity when transfer bumps (like in Mario bump on question block can kill the goombas on top)

    Declaration
    bool TransferWithAttack { get; }

    Methods

    AllowBump(Entity, Direction4)

    True if the entity can be bump by the given target and direction currently

    Declaration
    bool AllowBump(Entity rig, Direction4 from)

    AnimateForBump(IBumpable, Cell, int, int, int)

    Update the animation for bump, call this function every frame

    Declaration
    public static void AnimateForBump(IBumpable bumpable, Cell cell, int duration = 12, int distance = 32, int size = 32)
    Parameters
    Type Name Description
    IBumpable bumpable

    Target entity

    Cell cell

    Rendering cell

    int duration

    How length does the animation takes when it get bump

    int distance

    How far does it move when it get bump

    int size

    How big does it scale when it get bump

    BumpAllOverlap(Entity, Direction4, bool, Damage, int)

    Perform bump for all overlaped IBumpable entities

    Declaration
    public static void BumpAllOverlap(Entity sender, Direction4 directionTo, bool forceBump = false, Damage damageToBumpedObject = default, int collisionMask = 3)
    Parameters
    Type Name Description
    Entity sender

    Entity that send the bump

    Direction4 directionTo

    Bump the IBumpables to this direction

    bool forceBump

    True if ignore the AllowBump function check this time

    Damage damageToBumpedObject

    Damage data that apply to the entities being bump

    int collisionMask

    Which layer does this bump applies

    GetBumpTransferDamage()

    Get the instance of the damage that this entity deal to other when it transfer bump

    Declaration
    Damage GetBumpTransferDamage()

    IsValidBumpDirection(IBumpable, Direction4)

    Trie if the given direction can be bump

    Declaration
    public static bool IsValidBumpDirection(IBumpable bump, Direction4 from)
    Parameters
    Type Name Description
    IBumpable bump

    Target entity

    OnBumped(Entity, Damage)

    This function is called when this entity is bumped

    Declaration
    void OnBumped(Entity rig, Damage damage)
    Parameters
    Type Name Description
    Entity rig

    Rigidbody that bumps this entity

    Damage damage

    The damage this entity got from this bump

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