Table of Contents

Class PlayerInfo

Namespace
VoxelPlayground.Gaming
Assembly
GamePlay.dll
public class PlayerInfo : MonoBehaviour
Inheritance
object
PlayerInfo
Extension Methods

Fields

autoHealAmount

public int autoHealAmount

Field Value

int

autoHealBeginCooldown

public float autoHealBeginCooldown

Field Value

float

autoHealIntervalCooldown

public float autoHealIntervalCooldown

Field Value

float

autoPickupRadius

public float autoPickupRadius

Field Value

float

CameraWallPenetration

public Volume CameraWallPenetration

Field Value

Volume

droppedResourcePrefab

public DroppedResource droppedResourcePrefab

Field Value

DroppedResource

fireVolume

public Volume fireVolume

Field Value

Volume

heartbeatSoundVolume

[ShowInInspector]
public SoundParameterVolumeRatio heartbeatSoundVolume

Field Value

SoundParameterVolumeRatio

instance

public static PlayerInfo instance

Field Value

PlayerInfo

inventory

[ShowInInspector]
public List<EntityAttachmentItem> inventory

Field Value

List<EntityAttachmentItem>

isCheatedInThisScene

[Tooltip("Is Cheated During this Battle")]
[NonSerialized]
[ShowInInspector]
[SuffixLabel("Debug", false)]
public bool isCheatedInThisScene

Field Value

bool

isInvulnerable

public bool isInvulnerable

Field Value

bool

lowHealthVolume

public Volume lowHealthVolume

Field Value

Volume

maxHealth

public int maxHealth

Field Value

int

OnceItemPlaced

public Func<EntityAttachmentItem, bool> OnceItemPlaced

Field Value

Func<EntityAttachmentItem, bool>

OnPlayerInfoUpdated

public Action OnPlayerInfoUpdated

Field Value

Action

OnPlayerResInfoUpdated

public Action OnPlayerResInfoUpdated

Field Value

Action

playHeartbeatSfxOnHealthPercentageUnder

[Header("Low Health FX")]
public float playHeartbeatSfxOnHealthPercentageUnder

Field Value

float

poisonVolume

public Volume poisonVolume

Field Value

Volume

resKindIcons

public Sprite[] resKindIcons

Field Value

Sprite[]

resKindMats

public Material[] resKindMats

Field Value

Material[]

restrainedBy

public EntityCharacter restrainedBy

Field Value

EntityCharacter

Properties

blueprintDraft

Current blueprint draft for saving. Set to new instance to enter save mode, set to null to exit.

public BlueprintDraft blueprintDraft { get; set; }

Property Value

BlueprintDraft

fire

public float fire { get; set; }

Property Value

float

health

public int health { get; set; }

Property Value

int

healthPercentage

public float healthPercentage { get; }

Property Value

float

inRecycleMode

public static bool inRecycleMode { get; set; }

Property Value

bool

inRepairMode

public static bool inRepairMode { get; set; }

Property Value

bool

placingBlueprintData

Blueprint data to place. Set to enter placing mode, set to null to exit.

public BlueprintData placingBlueprintData { get; set; }

Property Value

BlueprintData

placingItemPrefab

public GameObject placingItemPrefab { get; set; }

Property Value

GameObject

poison

public float poison { get; set; }

Property Value

float

resMetal

public int resMetal { get; set; }

Property Value

int

resStone

public int resStone { get; set; }

Property Value

int

restraint

public float restraint { get; set; }

Property Value

float

resWood

public int resWood { get; set; }

Property Value

int

Methods

CanBuy(CraftingRecipe)

public bool CanBuy(CraftingRecipe c)

Parameters

c CraftingRecipe

Returns

bool

Cost(CraftingRecipe)

public void Cost(CraftingRecipe c)

Parameters

c CraftingRecipe

DamageHealth(int)

public void DamageHealth(int damage)

Parameters

damage int

Earn(int, int, int)

public void Earn(int wood = 0, int stone = 0, int metal = 0)

Parameters

wood int
stone int
metal int

Earn(ResKind, int)

public void Earn(PlayerInfo.ResKind kind, int count)

Parameters

kind PlayerInfo.ResKind
count int

Heal(int)

public void Heal(int heal)

Parameters

heal int

Reset()

public void Reset()

SpawnDroppedResource(Vector3, ResKind, int, EntityCharacter)

public void SpawnDroppedResource(Vector3 worldpos, PlayerInfo.ResKind kind, int count, EntityCharacter ignoreCollisionChar = null)

Parameters

worldpos Vector3
kind PlayerInfo.ResKind
count int
ignoreCollisionChar EntityCharacter

UpdateCameraWallPenetrationVolume(float)

public void UpdateCameraWallPenetrationVolume(float percent)

Parameters

percent float

Events

OnBlueprintDraftChanged

public event Action<BlueprintDraft> OnBlueprintDraftChanged

Event Type

Action<BlueprintDraft>

OnPlacingBlueprintDataChanged

public event Action<BlueprintData> OnPlacingBlueprintDataChanged

Event Type

Action<BlueprintData>

OnPlacingItemPrefabChanged

public event Action<GameObject> OnPlacingItemPrefabChanged

Event Type

Action<GameObject>