Show / Hide Table of Contents

Class Player

A class for accessing and doing things related to the player

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
Player
Namespace: WeaverCore
Assembly: WeaverCore.dll
Syntax
public class Player : MonoBehaviour

Properties

| Edit this page View Source

AllPlayers

A list of all players in the game.

Declaration
public static IEnumerable<Player> AllPlayers { get; }
Property Value
Type Description
IEnumerable<Player>
| Edit this page View Source

EssenceCollected

The amount of essence the player has collected

Declaration
public int EssenceCollected { get; set; }
Property Value
Type Description
int
| Edit this page View Source

EssenceSpent

The amount of essence the player has spent

Declaration
public int EssenceSpent { get; set; }
Property Value
Type Description
int
| Edit this page View Source

HasDreamNail

Does the player have a dream nail?

Declaration
public bool HasDreamNail { get; }
Property Value
Type Description
bool
| Edit this page View Source

Player1

The main player in the game

Declaration
public static Player Player1 { get; }
Property Value
Type Description
Player
| Edit this page View Source

Player1Raw

Declaration
public static Player Player1Raw { get; }
Property Value
Type Description
Player

Methods

| Edit this page View Source

EnterCutsceneLock(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?

| Edit this page View Source

EnterParryState()

The player enters a parry state, where they are very shortly invincible

Declaration
public void EnterParryState()
| Edit this page View Source

EnterRoarLock()

Causes the player to enter a locked state during an enemy roar

Declaration
public void EnterRoarLock()
| Edit this page View Source

ExitCutsceneLock()

Exits a cutscene lock and unfreezes the player

Declaration
public void ExitCutsceneLock()
| Edit this page View Source

ExitRoarLock()

Causes the player to exit from a locked roar state

Declaration
public void ExitRoarLock()
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

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

| Edit this page View Source

RecoverFromParry()

The player exits a parry state

Declaration
public void RecoverFromParry()
| Edit this page View Source

RefreshSoulUI()

Refreshes the soul UI

Declaration
public void RefreshSoulUI()
| Edit this page View Source

SoulGain()

Causes the player to gain soul

Declaration
public void SoulGain()

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾