Class Weapon
Inherited Members
Component.GetComponentInChildren<T>()
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DestroyObject(Object)
Assembly: LobsterFramework.dll
Syntax
[RequireComponent(typeof(Collider2D))]
public class Weapon : MonoBehaviour
Properties
|
Improve this Doc
View Source
AbilitySetting
Declaration
public (Type, string) AbilitySetting { get; }
Property Value
|
Improve this Doc
View Source
AttackSpeed
Declaration
public float AttackSpeed { get; }
Property Value
|
Improve this Doc
View Source
ClashSpark
Declaration
public string ClashSpark { get; }
Property Value
|
Improve this Doc
View Source
DefenseSpeed
Declaration
public float DefenseSpeed { get; }
Property Value
|
Improve this Doc
View Source
DoubleHanded
Declaration
public bool DoubleHanded { get; }
Property Value
|
Improve this Doc
View Source
Entity
Declaration
public Entity Entity { get; set; }
Property Value
|
Improve this Doc
View Source
GMoveSpeedModifier
Declaration
public float GMoveSpeedModifier { get; }
Property Value
|
Improve this Doc
View Source
GRotationSpeedModifier
Declaration
public float GRotationSpeedModifier { get; }
Property Value
|
Improve this Doc
View Source
HMoveSpeedModifier
Declaration
public float HMoveSpeedModifier { get; }
Property Value
|
Improve this Doc
View Source
HRotationSpeedModifier
Declaration
public float HRotationSpeedModifier { get; }
Property Value
|
Improve this Doc
View Source
Head
Declaration
public Transform Head { get; }
Property Value
|
Improve this Doc
View Source
HealthDamageReduction
Declaration
public float HealthDamageReduction { get; }
Property Value
|
Improve this Doc
View Source
LMoveSpeedModifier
Declaration
public float LMoveSpeedModifier { get; }
Property Value
|
Improve this Doc
View Source
LRotationSpeedModifier
Declaration
public float LRotationSpeedModifier { get; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; }
Property Value
|
Improve this Doc
View Source
OnHitDamage
Declaration
public Damage OnHitDamage { get; }
Property Value
|
Improve this Doc
View Source
PostureDamageReduction
Declaration
public float PostureDamageReduction { get; }
Property Value
|
Improve this Doc
View Source
Sharpness
Declaration
public float Sharpness { get; }
Property Value
|
Improve this Doc
View Source
State
Declaration
public WeaponState State { get; set; }
Property Value
|
Improve this Doc
View Source
Tail
Declaration
public Transform Tail { get; }
Property Value
|
Improve this Doc
View Source
WeaponType
Declaration
public WeaponType WeaponType { get; }
Property Value
|
Improve this Doc
View Source
Weight
Declaration
public float Weight { get; }
Property Value
Methods
|
Improve this Doc
View Source
Disable()
Disable the weapon collider and reset momentum
Declaration
|
Improve this Doc
View Source
Enable(WeaponState)
Enable the collider of the weapon and set its weapon state. Momentum will start to accumulate after this. Can only be used after calling On().
Declaration
public void Enable(WeaponState state = WeaponState.Attacking)
Parameters
Type |
Name |
Description |
WeaponState |
state |
The weapon state to set the weapon to be
|
|
Improve this Doc
View Source
GetWeaponStat<T>()
Get the weapon stat of specified type if exists
Declaration
public T GetWeaponStat<T>() where T : WeaponStat
Returns
Type |
Description |
T |
The target weapon stat if exists, otherwise null
|
Type Parameters
Name |
Description |
T |
The type of the weapon stat to be fetched
|
|
Improve this Doc
View Source
HasWeaponStat(Type)
Check if the WeaponStat is present on this weapon
Declaration
public bool HasWeaponStat(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
The type of the WeaponStat being queried
|
Returns
Type |
Description |
bool |
True if exists, otherwise false
|
|
Improve this Doc
View Source
HasWeaponStat<T>()
Check if the WeaponStat is present on this weapon
Declaration
public bool HasWeaponStat<T>() where T : WeaponStat
Returns
Type |
Description |
bool |
True if exists, otherwise false
|
Type Parameters
Name |
Description |
T |
The type of WeaponStat being queried
|
|
Improve this Doc
View Source
Pause()
Disable the weapon collider but keep the weapon occupied s.t other offensive abilities cannot override.
Declaration
|
Improve this Doc
View Source
SetOnHitDamage(Damage)
Declaration
public void SetOnHitDamage(Damage damage)
Parameters
Type |
Name |
Description |
Damage |
damage |
|
|
Improve this Doc
View Source
SetOnHitDamage(float, float)
Declaration
public void SetOnHitDamage(float health, float posture)
Parameters
Events
|
Improve this Doc
View Source
OnEntityHit
Declaration
public event Action<Entity> OnEntityHit
Event Type
|
Improve this Doc
View Source
OnWeaponDeflect
Declaration
public event Action OnWeaponDeflect
Event Type
|
Improve this Doc
View Source
OnWeaponHit
Declaration
public event Action<Weapon> OnWeaponHit
Event Type