Super Bomber Kit
Search Results for

    Show / Hide Table of Contents

    Interface IPlayerBehaviourCore

    This component is responsible for unifying all Behavior Components. Using interface ensures decoupling.

    Namespace: BomberDogs.PlayerBehaviours
    Assembly: Assembly-CSharp.dll
    Syntax
    public interface IPlayerBehaviourCore

    Methods

    | Edit this page View Source

    AddOrConsumePowerUp(EPowerUp)

    Increase powerup. When there is a collision with a powerup, it will be added through here.

    Declaration
    void AddOrConsumePowerUp(EPowerUp powerUp)
    Parameters
    Type Name Description
    EPowerUp powerUp
    | Edit this page View Source

    ControlIsDisabled()

    checks if the character's control is enabled.. Disabling character control is useful in some scenes. Also, if the character is using a mount, their control is disabled so that they remain on top of the mount.

    Declaration
    bool ControlIsDisabled()
    Returns
    Type Description
    bool

    disabled bool

    | Edit this page View Source

    CrossFade(string, float)

    Triggers crossfade in the animator. This is used by the Behavior components.

    Declaration
    void CrossFade(string stateName, float normalizedTransitionDuration)
    Parameters
    Type Name Description
    string stateName

    Animator state name

    float normalizedTransitionDuration

    Specify time

    | Edit this page View Source

    DisableControls(bool)

    Enables or disables the control

    Declaration
    void DisableControls(bool disable)
    Parameters
    Type Name Description
    bool disable

    disable

    | Edit this page View Source

    GetAnimator()

    Get Animator, some components need access to the animator to control animations.

    Declaration
    Animator GetAnimator()
    Returns
    Type Description
    Animator

    animator

    | Edit this page View Source

    GetCollider()

    Get Collider, some components need access to the animator to control collisions.

    Declaration
    CircleCollider2D GetCollider()
    Returns
    Type Description
    CircleCollider2D

    rigdbody 2D

    | Edit this page View Source

    GetComponent<T>()

    Access to get component. Since we are in an interface we need to redeclare this.

    Declaration
    T GetComponent<T>()
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    GetInput()

    Obtains the input, which is the intermediary through which control commands are received.

    Declaration
    PlayerInputBase GetInput()
    Returns
    Type Description
    PlayerInputBase

    Collider

    | Edit this page View Source

    GetPowerUps()

    Get powerups, some components need this to know if specific power up is enabled.

    Declaration
    List<EPowerUp> GetPowerUps()
    Returns
    Type Description
    List<EPowerUp>
    | Edit this page View Source

    GetRigidbody()

    Get Rigidbody, some components need access to the animator to control physics.

    Declaration
    Rigidbody2D GetRigidbody()
    Returns
    Type Description
    Rigidbody2D
    | Edit this page View Source

    GetSpriteRenderer()

    Get sprite, some components need access to the animator to control sprites.

    Declaration
    SpriteRenderer GetSpriteRenderer()
    Returns
    Type Description
    SpriteRenderer

    input

    | Edit this page View Source

    IsConsumablePowerup(EPowerUp)

    Declaration
    bool IsConsumablePowerup(EPowerUp powerUp)
    Parameters
    Type Name Description
    EPowerUp powerUp
    Returns
    Type Description
    bool
    | Edit this page View Source

    SetParent(Transform)

    Defines the parent. Required in some Behaviour components. Especially for mountables.

    Declaration
    void SetParent(Transform parent)
    Parameters
    Type Name Description
    Transform parent

    parent transform

    | Edit this page View Source

    SetPlayerNumber(int)

    Set player number. This is used by LevelManager

    Declaration
    void SetPlayerNumber(int number)
    Parameters
    Type Name Description
    int number

    player number

    Events

    | Edit this page View Source

    onAddPowerUp

    Some components need to know when a specific powerup was added

    Declaration
    event Action<EPowerUp, PlayerBehaviourCore> onAddPowerUp
    Event Type
    Type Description
    Action<EPowerUp, PlayerBehaviourCore>
    | Edit this page View Source

    onRemovePowerUp

    Some components need to know when a specific powerup is removed

    Declaration
    event Action<EPowerUp> onRemovePowerUp
    Event Type
    Type Description
    Action<EPowerUp>
    • Edit this page
    • View Source
    In this article
    Back to top