CardRPG 1.0
 
Loading...
Searching...
No Matches
CardRPG.GameManager Class Reference

A manager class that handles the game state, player management, inventory, and saving/loading functionality. More...

Inheritance diagram for CardRPG.GameManager:

Public Member Functions

void NewGame ()
 Starts a new game with a single initial player and the specified starting quest.
 
void AddGold (int amount)
 Adds gold to the player's total gold amount.
 
void AddPlayer (int level)
 Adds a new player to the game with the specified level.
 
void AddEquipment (Equipment equipment)
 Adds the specified equipment to the player's inventory.
 
void AddCard (Card card)
 Adds a card to the player's inventory.
 
void SaveGame ()
 Saves the current game state.
 
void LoadGame ()
 Loads the game state from a saved file.
 
void QuitToTitle ()
 Quits the current game, destroys all objects, and loads the title scene.
 
List< T > GetInventoryItems< T > ()
 Gets a list of inventory items of the specified type.
 

Public Attributes

string[] ElementList = { "Fire" }
 
List< DuelerCardstartingCards
 
Deck startingDeck
 
Quest startingQuest
 
int startingElement
 
int[] baseHealth
 
float[] healthPerLevel
 
int[] baseMana
 
float[] manaPerLevel
 
bool EquipmentHealthRebalance = true
 
string titleScene
 

Static Public Attributes

static GameManager Instance
 

Properties

List< Player > CurrentPlayers = new() [get]
 
List< DuelerCardInventoryCards = new() [get, set]
 
List< HatInventoryHats = new() [get]
 
List< RobeInventoryRobes = new() [get]
 
List< BootInventoryBoots = new() [get]
 
List< AthameInventoryAthames = new() [get]
 
List< AmuletInventoryAmulets = new() [get]
 
List< RingInventoryRings = new() [get]
 
List< DeckInventoryDecks = new() [get]
 
int Gold [get]
 
Sprite ItemCardImage [get]
 
Sprite TreasureCardImage [get]
 
HashSet< string > ListOfWorld = new() [get]
 
int WoodenSkeletonKey [get, set]
 
UnityEvent OnGoldChange = new() [get, set]
 

Detailed Description

A manager class that handles the game state, player management, inventory, and saving/loading functionality.

Member Function Documentation

◆ AddCard()

void CardRPG.GameManager.AddCard ( Card card)
inline

Adds a card to the player's inventory.

Parameters
card

◆ AddEquipment()

void CardRPG.GameManager.AddEquipment ( Equipment equipment)
inline

Adds the specified equipment to the player's inventory.

Parameters
equipment

◆ AddGold()

void CardRPG.GameManager.AddGold ( int amount)
inline

Adds gold to the player's total gold amount.

Parameters
amount

◆ AddPlayer()

void CardRPG.GameManager.AddPlayer ( int level)
inline

Adds a new player to the game with the specified level.

Parameters
level

◆ GetInventoryItems< T >()

List< T > CardRPG.GameManager.GetInventoryItems< T > ( )
inline

Gets a list of inventory items of the specified type.

Template Parameters
T
Returns
Type Constraints
T :IShopableItem 

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