SF Tool Documentation
Search Results for

    Show / Hide Table of Contents

    Class MeleeWeapon

    Inheritance
    System.Object
    WeaponBase
    MeleeWeapon
    ComboMeleeWeapon
    Implements
    IWeapon
    Inherited Members
    WeaponBase.WeaponDamage
    WeaponBase._knockBackForce
    WeaponBase._character2D
    WeaponBase._controllerBody2D
    WeaponBase._filter
    WeaponBase._attackTimer
    WeaponBase.OnCooldown
    WeaponBase.UseCompleted
    WeaponBase.Initialize(ControllerBody2D)
    Namespace: SF.Weapons
    Assembly: cs.temp.dll.dll
    Syntax
    public class MeleeWeapon : WeaponBase, IWeapon

    Fields

    _facingDirection

    Declaration
    protected Vector2 _facingDirection
    Field Value
    Type Description
    Vector2

    _hitBox

    Declaration
    protected SFShapeComponent _hitBox
    Field Value
    Type Description
    SFShapeComponent

    _hitBoxTimer

    The delay before the hit box is enabled. This allows for matching damage with the animation visuals.

    Declaration
    protected Timer _hitBoxTimer
    Field Value
    Type Description
    Timer

    _hitResults

    Declaration
    protected readonly List<PhysicsShape> _hitResults
    Field Value
    Type Description
    System.Collections.Generic.List<PhysicsShape>

    _originalHitBoxOffset

    Declaration
    protected Vector2 _originalHitBoxOffset
    Field Value
    Type Description
    Vector2

    AttackDefinition

    Declaration
    public AttackDefinition AttackDefinition
    Field Value
    Type Description
    AttackDefinition

    Methods

    Awake()

    Declaration
    protected virtual void Awake()

    DoAttack()

    Declaration
    protected virtual void DoAttack()

    OnDirectionChange(Object, Vector2)

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

    OnHitBoxDelay()

    Finishes a timed delay before activating the hit box for weapons to do hit box checks and apply damage. Allows for syncing visual animations with the hit box better to make combat feel more accurate.

    Declaration
    protected virtual void OnHitBoxDelay()

    OnUseComplete()

    Declaration
    protected virtual void OnUseComplete()

    Use()

    Declaration
    public override void Use()
    Overrides
    WeaponBase.Use()

    Implements

    IWeapon
    In This Article
    Back to top Generated by DocFX