Weapon
Namespace: SharpPluginLoader.Core.Weapons
Represents an instance of a uWeapon class
public class Weapon : SharpPluginLoader.Core.Models.Model
Inheritance Object → NativeWrapper → MtObject → Model → Weapon
Properties
Type
Gets the type of the weapon
public WeaponType Type { get; }
Property Value
Holder
Gets the holder of the weapon if it has one
public Entity Holder { get; }
Property Value
Position
The position of the model
public MtVector3& Position { get; }
Property Value
Size
The size of the model
public MtVector3& Size { get; }
Property Value
CollisionPosition
The position of the model's collision box
public MtVector3& CollisionPosition { get; }
Property Value
Rotation
The rotation of the model
public MtQuaternion& Rotation { get; }
Property Value
Forward
The model's forward vector
public MtVector3 Forward { get; }
Property Value
AnimationFrame
The current frame of the model's current animation
public float AnimationFrame { get; set; }
Property Value
MaxAnimationFrame
The frame count of the model's current animation
public float MaxAnimationFrame { get; set; }
Property Value
AnimationSpeed
The speed of the model's current animation. Note, this value gets set every frame.
public float AnimationSpeed { get; set; }
Property Value
CurrentAnimation
Gets the current animation of the model
public AnimationId& CurrentAnimation { get; }
Property Value
AnimationLayer
The model's animation component
public AnimationLayerComponent AnimationLayer { get; }
Property Value
MotionLists
The model's motion lists.
public IEnumerable<MotionList> MotionLists { get; }
Property Value
Instance
The native pointer.
public nint Instance { get; set; }
Property Value
Constructors
Weapon(IntPtr)
public Weapon(nint instance)
Parameters
instance
IntPtr
Weapon()
public Weapon()
Methods
RegisterObjCollision(Resource, UInt32)
Registers the given rObjCollision (.col file) for the weapon. This col can then be called by an lmt.
public void RegisterObjCollision(Resource objCollision, uint index)
Parameters
objCollision
Resource
The col to register
index
UInt32
The index in which to register the col file. Must be less than 8