The Cursed Labyrinth
Loading...
Searching...
No Matches
PlayerInventory Class Referencesealed
Inheritance diagram for PlayerInventory:
Collaboration diagram for PlayerInventory:

Classes

struct  Snapshot

Public Member Functions

Snapshot GetSnapshot ()
void ApplySnapshot (Snapshot s)
void Add (Item.ItemType type, int amount=1)
bool TryCarrySpecial (Item.ItemType t)
 Try to place a special item into the carry slot. Returns false if already carrying something else.
void DropCarriedSpecial (GameObject dropPrefab, Vector3 pos)
 Drop the carried special (spawns a special pickup and registers it for respawn).
void ConsumeCarriedSpecial ()
 Consume the carried special (used on correct pedestal).
bool IsCarrying (Item.ItemType t)
bool RemoveSword (int amount=1)
bool UsePotion ()
bool HasBook (Item.ItemType t)
bool AllBooksFilled ()
bool TryPickupSpecial (Item.ItemType t)

Properties

Item.? ItemType CarriedSpecial [get]
int Swords [get]
int Potions [get]
bool IsCarryingAny [get]

Events

Action< SnapshotChanged
Action< Item.ItemType?> CarriedSpecialChanged

Member Function Documentation

◆ Add()

void PlayerInventory.Add ( Item.ItemType type,
int amount = 1 )

◆ AllBooksFilled()

bool PlayerInventory.AllBooksFilled ( )

◆ ApplySnapshot()

void PlayerInventory.ApplySnapshot ( Snapshot s)

◆ ConsumeCarriedSpecial()

void PlayerInventory.ConsumeCarriedSpecial ( )

Consume the carried special (used on correct pedestal).

◆ DropCarriedSpecial()

void PlayerInventory.DropCarriedSpecial ( GameObject dropPrefab,
Vector3 pos )

Drop the carried special (spawns a special pickup and registers it for respawn).

◆ GetSnapshot()

Snapshot PlayerInventory.GetSnapshot ( )

◆ HasBook()

bool PlayerInventory.HasBook ( Item.ItemType t)

◆ IsCarrying()

bool PlayerInventory.IsCarrying ( Item.ItemType t)

◆ RemoveSword()

bool PlayerInventory.RemoveSword ( int amount = 1)

◆ TryCarrySpecial()

bool PlayerInventory.TryCarrySpecial ( Item.ItemType t)

Try to place a special item into the carry slot. Returns false if already carrying something else.

◆ TryPickupSpecial()

bool PlayerInventory.TryPickupSpecial ( Item.ItemType t)

◆ UsePotion()

bool PlayerInventory.UsePotion ( )

Property Documentation

◆ CarriedSpecial

Item.? ItemType PlayerInventory.CarriedSpecial
get

◆ IsCarryingAny

bool PlayerInventory.IsCarryingAny
get

◆ Potions

int PlayerInventory.Potions
get

◆ Swords

int PlayerInventory.Swords
get

Event Documentation

◆ CarriedSpecialChanged

Action<Item.ItemType?> PlayerInventory.CarriedSpecialChanged

◆ Changed

Action<Snapshot> PlayerInventory.Changed

The documentation for this class was generated from the following file: