Weapon

Namespace: SharpPluginLoader.Core.Weapons

Represents an instance of a uWeapon class

public class Weapon : SharpPluginLoader.Core.Models.Model

Inheritance ObjectNativeWrapperMtObjectModelWeapon

Properties

Type

Gets the type of the weapon

public WeaponType Type { get; }

Property Value

WeaponType

Holder

Gets the holder of the weapon if it has one

public Entity Holder { get; }

Property Value

Entity

Position

The position of the model

public MtVector3& Position { get; }

Property Value

MtVector3&

Size

The size of the model

public MtVector3& Size { get; }

Property Value

MtVector3&

CollisionPosition

The position of the model's collision box

public MtVector3& CollisionPosition { get; }

Property Value

MtVector3&

Rotation

The rotation of the model

public MtQuaternion& Rotation { get; }

Property Value

MtQuaternion&

Forward

The model's forward vector

public MtVector3 Forward { get; }

Property Value

MtVector3

AnimationFrame

The current frame of the model's current animation

public float AnimationFrame { get; set; }

Property Value

Single

MaxAnimationFrame

The frame count of the model's current animation

public float MaxAnimationFrame { get; set; }

Property Value

Single

AnimationSpeed

The speed of the model's current animation. Note, this value gets set every frame.

public float AnimationSpeed { get; set; }

Property Value

Single

CurrentAnimation

Gets the current animation of the model

public AnimationId& CurrentAnimation { get; }

Property Value

AnimationId&

AnimationLayer

The model's animation component

public AnimationLayerComponent AnimationLayer { get; }

Property Value

AnimationLayerComponent

MotionLists

The model's motion lists.

public IEnumerable<MotionList> MotionLists { get; }

Property Value

IEnumerable<MotionList>

Instance

The native pointer.

public nint Instance { get; set; }

Property Value

IntPtr

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

Exceptions

ArgumentOutOfRangeException