Class PlayerInfo
- Namespace
- VoxelPlayground.Gaming
- Assembly
- GamePlay.dll
public class PlayerInfo : MonoBehaviour
- Inheritance
-
objectPlayerInfo
- 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
fireVolume
public Volume fireVolume
Field Value
- Volume
heartbeatSoundVolume
[ShowInInspector]
public SoundParameterVolumeRatio heartbeatSoundVolume
Field Value
- SoundParameterVolumeRatio
instance
public static PlayerInfo instance
Field Value
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
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
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
placingItemPrefab
public GameObject placingItemPrefab { get; set; }
Property Value
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
Returns
- bool
Cost(CraftingRecipe)
public void Cost(CraftingRecipe c)
Parameters
DamageHealth(int)
public void DamageHealth(int damage)
Parameters
damageint
Earn(int, int, int)
public void Earn(int wood = 0, int stone = 0, int metal = 0)
Parameters
woodintstoneintmetalint
Earn(ResKind, int)
public void Earn(PlayerInfo.ResKind kind, int count)
Parameters
kindPlayerInfo.ResKindcountint
Heal(int)
public void Heal(int heal)
Parameters
healint
Reset()
public void Reset()
SpawnDroppedResource(Vector3, ResKind, int, EntityCharacter)
public void SpawnDroppedResource(Vector3 worldpos, PlayerInfo.ResKind kind, int count, EntityCharacter ignoreCollisionChar = null)
Parameters
worldposVector3kindPlayerInfo.ResKindcountintignoreCollisionCharEntityCharacter
UpdateCameraWallPenetrationVolume(float)
public void UpdateCameraWallPenetrationVolume(float percent)
Parameters
percentfloat
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>