Class Player
A class for accessing and doing things related to the player
Namespace: WeaverCore
Assembly: WeaverCore.dll
Syntax
public class Player : MonoBehaviour
Properties
| Edit this page View SourceAllPlayers
A list of all players in the game.
Declaration
public static IEnumerable<Player> AllPlayers { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Player> |
EssenceCollected
The amount of essence the player has collected
Declaration
public int EssenceCollected { get; set; }
Property Value
Type | Description |
---|---|
int |
EssenceSpent
The amount of essence the player has spent
Declaration
public int EssenceSpent { get; set; }
Property Value
Type | Description |
---|---|
int |
HasDreamNail
Does the player have a dream nail?
Declaration
public bool HasDreamNail { get; }
Property Value
Type | Description |
---|---|
bool |
Player1
The main player in the game
Declaration
public static Player Player1 { get; }
Property Value
Type | Description |
---|---|
Player |
Player1Raw
Declaration
public static Player Player1Raw { get; }
Property Value
Type | Description |
---|---|
Player |
Methods
| Edit this page View SourceEnterCutsceneLock(bool)
Enters a cutscene lock that freezes the player.
Declaration
public void EnterCutsceneLock(bool playSound)
Parameters
Type | Name | Description |
---|---|---|
bool | playSound | Should a cutscene sound be played? |
EnterParryState()
The player enters a parry state, where they are very shortly invincible
Declaration
public void EnterParryState()
EnterRoarLock()
Causes the player to enter a locked state during an enemy roar
Declaration
public void EnterRoarLock()
ExitCutsceneLock()
Exits a cutscene lock and unfreezes the player
Declaration
public void ExitCutsceneLock()
ExitRoarLock()
Causes the player to exit from a locked roar state
Declaration
public void ExitRoarLock()
HasCharmEquipped(int)
Does the player have a certain charm equipped?
Declaration
public bool HasCharmEquipped(int charmNumber)
Parameters
Type | Name | Description |
---|---|---|
int | charmNumber | The charm ID to check for |
Returns
Type | Description |
---|---|
bool |
NearestPlayer(Component)
Gets the player that is nearest to a certain object
Declaration
public static Player NearestPlayer(Component component)
Parameters
Type | Name | Description |
---|---|---|
Component | component |
Returns
Type | Description |
---|---|
Player |
NearestPlayer(GameObject)
Gets the player that is nearest to a certain object
Declaration
public static Player NearestPlayer(GameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject |
Returns
Type | Description |
---|---|
Player |
NearestPlayer(Transform)
Gets the player that is nearest to a certain object
Declaration
public static Player NearestPlayer(Transform transform)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform |
Returns
Type | Description |
---|---|
Player |
NearestPlayer(Vector3)
Gets the player that is nearest to a certain position
Declaration
public static Player NearestPlayer(Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | position |
Returns
Type | Description |
---|---|
Player |
PlayAttackSlash(GameObject, HitInfo, Vector3)
Plays a nail slash effect. Used when the player hits an enemy
Declaration
public virtual void PlayAttackSlash(GameObject target, HitInfo hit, Vector3 effectsOffset = default)
Parameters
Type | Name | Description |
---|---|---|
GameObject | target | The target object receiving the hit |
HitInfo | hit | The hit on the enemy |
Vector3 | effectsOffset | An offset applied to the effects |
PlayAttackSlash(Vector3, HitInfo)
Plays a nail slash effect. Used when the player hits an enemy
Declaration
public virtual void PlayAttackSlash(Vector3 target, HitInfo hit)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | target | The target object receiving the hit |
HitInfo | hit | The hit on the enemy |
Recoil(CardinalDirection)
Makes the player recoil from an attack
Declaration
public void Recoil(CardinalDirection recoilDirection)
Parameters
Type | Name | Description |
---|---|---|
CardinalDirection | recoilDirection | The direction the player should recoil in |
RecoverFromParry()
The player exits a parry state
Declaration
public void RecoverFromParry()
RefreshSoulUI()
Refreshes the soul UI
Declaration
public void RefreshSoulUI()
SoulGain()
Causes the player to gain soul
Declaration
public void SoulGain()