RpgGame
Console Based RPG game in C#
Loading...
Searching...
No Matches
RpgGame.Generation.Procedures.AddItemsProcedure Class Reference

Spawns treasure items (coins and gold) at random locations in the dungeon. More...

Inheritance diagram for RpgGame.Generation.Procedures.AddItemsProcedure:
Collaboration diagram for RpgGame.Generation.Procedures.AddItemsProcedure:

Public Member Functions

 AddItemsProcedure (int CoinCount=5, int GoldCount=2, int PotionCount=2, int ThornCount=1)
 Initializes the items spawning procedure.
 
async Task ApplyAsync (Level level, DungeonContext context)
 Applies the item spawning to the level.
 

Detailed Description

Spawns treasure items (coins and gold) at random locations in the dungeon.

This procedure places coins and gold piles at random walkable positions throughout the level, giving the player opportunities to collect valuable items.

Constructor & Destructor Documentation

◆ AddItemsProcedure()

RpgGame.Generation.Procedures.AddItemsProcedure.AddItemsProcedure ( int  CoinCount = 5,
int  GoldCount = 2,
int  PotionCount = 2,
int  ThornCount = 1 
)
inline

Initializes the items spawning procedure.

Parameters
CoinCountThe number of coins to spawn. Defaults to 5.
GoldCountThe number of gold piles to spawn. Defaults to 2.
PotionCountThe number of potions to spawn. Defaults to 2.
ThornCountThe number of thorns to spawn. Defaults to 1.

Member Function Documentation

◆ ApplyAsync()

async Task RpgGame.Generation.Procedures.AddItemsProcedure.ApplyAsync ( Level  level,
DungeonContext  context 
)
inline

Applies the item spawning to the level.

Parameters
levelThe level being generated.
contextShared generation state.
Returns
A task that completes when all items have been placed.

Implements RpgGame.Generation.IDungeonProcedure.

Here is the call graph for this function:

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