SF Tool Documentation
Search Results for

    Show / Hide Table of Contents

    Class WeaponBase

    Inheritance
    System.Object
    WeaponBase
    MeleeWeapon
    Implements
    IWeapon
    Namespace: SF.Weapons
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class WeaponBase : MonoBehaviour, IWeapon

    Fields

    _attackTimer

    Declaration
    protected Timer _attackTimer
    Field Value
    Type Description
    Timer

    _character2D

    Declaration
    protected CharacterRenderer2D _character2D
    Field Value
    Type Description
    CharacterRenderer2D

    _controllerBody2D

    Declaration
    protected ControllerBody2D _controllerBody2D
    Field Value
    Type Description
    ControllerBody2D

    _filter

    Declaration
    protected PhysicsQuery.QueryFilter _filter
    Field Value
    Type Description
    PhysicsQuery.QueryFilter

    _knockBackForce

    Declaration
    protected Vector2 _knockBackForce
    Field Value
    Type Description
    Vector2

    UseCompleted

    Declaration
    public Action UseCompleted
    Field Value
    Type Description
    System.Action

    WeaponDamage

    Declaration
    public int WeaponDamage
    Field Value
    Type Description
    System.Int32

    Properties

    OnCooldown

    Declaration
    public bool OnCooldown { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Initialize(ControllerBody2D)

    Declaration
    public virtual void Initialize(ControllerBody2D controllerBody2D = null)
    Parameters
    Type Name Description
    ControllerBody2D controllerBody2D

    OnDirectionChange(Object, Vector2)

    Mainly used in subclasses for things needing updated when character changes directions. Flipping melee hit boxes when characters change direction Changing projectile firing directions for range weapons or mixed style weapons.

    Declaration
    protected virtual void OnDirectionChange(object sender, Vector2 newDirection)
    Parameters
    Type Name Description
    System.Object sender
    Vector2 newDirection

    Use()

    Declaration
    public virtual void Use()

    Implements

    IWeapon
    In This Article
    Back to top Generated by DocFX