Class Player
- Namespace
- SharpPluginLoader.Core.Entities
- Assembly
- SharpPluginLoader.Core.dll
public class Player : Entity
- Inheritance
-
Player
- Inherited Members
Constructors
Player()
public Player()
Player(nint)
public Player(nint instance)
Parameters
instance
nint
Properties
CurrentWeapon
The currently equipped weapon
public Weapon? CurrentWeapon { get; }
Property Value
CurrentWeaponType
The currently equipped weapon type
public WeaponType CurrentWeaponType { get; }
Property Value
Health
The current health of the player
public ref float Health { get; }
Property Value
MainPlayer
The main player
public static Player? MainPlayer { get; }
Property Value
MaxHealth
The maximum health of the player
public ref float MaxHealth { get; }
Property Value
SingletonInstance
The sPlayer singleton instance
public static MtObject SingletonInstance { get; }
Property Value
Methods
CreateShell(ShellParam, Vector3, Vector3?)
Spawns the given shell on the entity
public override void CreateShell(ShellParam shell, Vector3 target, Vector3? origin = null)
Parameters
shell
ShellParamThe shell to spawn
target
Vector3The target position of the shell
origin
Vector3?The origin position of the shell (or null for the entity itself)
CreateShell(ShellParamList, uint, Vector3, Vector3?)
Spawns a shell on the entity from the given shll file
public override void CreateShell(ShellParamList shll, uint index, Vector3 target, Vector3? origin = null)
Parameters
shll
ShellParamListThe shll file to take the shell from
index
uintThe index of the shell in the entities shell list (shll)
target
Vector3The position the shell should travel towards
origin
Vector3?The origin of the shell (or null for the entity itself)
Remarks
Tip: You can load any shll file using GetResource<T>(string, MtDti, LoadFlags)
CreateShell(uint, Vector3, Vector3?)
Spawns a shell on the entity
public override void CreateShell(uint index, Vector3 target, Vector3? origin = null)
Parameters
index
uintThe index of the shell in the entities shell list (shll)
target
Vector3The position the shell should travel towards
origin
Vector3?The origin of the shell (or null for the entity itself)
RegisterMbd(Resource, uint)
public void RegisterMbd(Resource mbd, uint index)