+
+
+ Class CharacterItemUser
+
+ Manages the character's interaction with items, including usage, stamina management, and inventory control.
+
+
+
+
Inheritance
+
System.Object
+
CharacterItemUser
+
+
+ Assembly: cs.temp.dll.dll
+ Syntax
+
+
public class CharacterItemUser : IDisposable
+
+ Constructors
+
+
+
+
+ CharacterItemUser(CharacterFacade)
+ Constructor to initialize the CharacterItemUser with the associated character.
+
+
+ Declaration
+
+
public CharacterItemUser(CharacterFacade character)
+
+ Parameters
+
+
+
+ Type |
+ Name |
+ Description |
+
+
+
+
+ CharacterFacade |
+ character |
+ The character facade associated with this item user.
+ |
+
+
+
+ Properties
+
+
+
+
+ IsLockStaminaRecovery
+
+
+ Declaration
+
+
public bool IsLockStaminaRecovery { get; }
+
+ Property Value
+
+
+
+ Type |
+ Description |
+
+
+
+
+ System.Boolean |
+ |
+
+
+
+
+
+
+ LookDirection
+
+
+ Declaration
+
+
public Vector2 LookDirection { get; }
+
+ Property Value
+
+
+
+ Type |
+ Description |
+
+
+
+
+ Vector2 |
+ |
+
+
+
+
+
+
+ Position
+ Gets the character's current position.
+
+
+ Declaration
+
+
public Vector2 Position { get; }
+
+ Property Value
+
+
+
+ Type |
+ Description |
+
+
+
+
+ Vector2 |
+ |
+
+
+
+
+
+
+ PositionProvider
+ Gets the position provider for the character.
+
+
+ Declaration
+
+
public IPositionProvider PositionProvider { get; }
+
+ Property Value
+
+
+
+ Type |
+ Description |
+
+
+
+
+ IPositionProvider |
+ |
+
+
+
+
+
+
+
+ Gets the character's transform.
+
+
+ Declaration
+
+
public Transform Transform { get; }
+
+ Property Value
+
+
+
+ Type |
+ Description |
+
+
+
+
+ Transform |
+ |
+
+
+
+
+
+
+ ViewID
+ Gets the character's PhotonView ID.
+
+
+ Declaration
+
+
public int ViewID { get; }
+
+ Property Value
+
+
+
+ Type |
+ Description |
+
+
+
+
+ System.Int32 |
+ |
+
+
+
+ Methods
+
+
+
+
+ Dispose()
+
+
+ Declaration
+
+
public void Dispose()
+
+
+
+
+ EnableUseItemEvent()
+ Enables the event for using an item.
+
+
+ Declaration
+
+
public void EnableUseItemEvent()
+
+
+
+
+ IsStaminaEmpty()
+ Checks if the character's stamina is depleted.
+
+
+ Declaration
+
+
public bool IsStaminaEmpty()
+
+ Returns
+
+
+
+ Type |
+ Description |
+
+
+
+
+ System.Boolean |
+ True if stamina is empty; otherwise, false.
+ |
+
+
+
+
+
+
+ LockInventory()
+ Locks the character's inventory, preventing changes.
+
+
+ Declaration
+
+
public void LockInventory()
+
+
+
+
+ LockStaminaRecovery()
+ Locks stamina recovery for the character, preventing it from regenerating.
+
+
+ Declaration
+
+
public void LockStaminaRecovery()
+
+
+
+
+ ReleaseItem()
+ Releases the currently held item in the inventory.
+
+
+ Declaration
+
+
public void ReleaseItem()
+
+
+
+
+ SetCharacterControlEnabled(Boolean)
+ Enables or disables the character's control inputs.
+
+
+ Declaration
+
+
public void SetCharacterControlEnabled(bool enabled)
+
+ Parameters
+
+
+
+ Type |
+ Name |
+ Description |
+
+
+
+
+ System.Boolean |
+ enabled |
+ True to enable controls, false to disable.
+ |
+
+
+
+
+
+
+ UnlockInventory()
+ Unlocks the character's inventory, allowing changes.
+
+
+ Declaration
+
+
public void UnlockInventory()
+
+
+
+
+ UnlockStaminaRecovery()
+ Unlocks stamina recovery for the character, allowing it to regenerate.
+
+
+ Declaration
+
+
public void UnlockStaminaRecovery()
+
+
+
+
+ UseItem()
+ Uses the currently selected item in the inventory.
+
+
+ Declaration
+
+
public void UseItem()
+
+
+
+
+ UseStaminaPerSec(Single)
+ Consumes stamina per second for the character.
+
+
+ Declaration
+
+
public void UseStaminaPerSec(float amount)
+
+ Parameters
+
+
+
+ Type |
+ Name |
+ Description |
+
+
+
+
+ System.Single |
+ amount |
+ The amount of stamina to consume per second.
+ |
+
+
+
+