RpgGame
Console Based RPG game in C#
Loading...
Searching...
No Matches
RpgGame.Items.Thorn Class Reference

Represents a Thorn on that map, and walking over it causes damange. More...

Inheritance diagram for RpgGame.Items.Thorn:
Collaboration diagram for RpgGame.Items.Thorn:

Public Member Functions

string GetDescription ()
 Returns a description of the potion's effect.
 
bool OnPickup (Player player, Inventory inventory)
 Applies damage to the player when they step on the thorn.
 
void OnDrop (Level level, Player player)
 Just here to satisty the IItem interface.
 

Properties

string Name [get]
 Gets the name of the potion.
 
char Symbol [get]
 Gets the character symbol representing the potion on the map.
 
ConsoleColor color [get]
 Gets the color of the potion when rendered.
 
- Properties inherited from RpgGame.Items.IItem

Detailed Description

Represents a Thorn on that map, and walking over it causes damange.

Member Function Documentation

◆ GetDescription()

string RpgGame.Items.Thorn.GetDescription ( )

Returns a description of the potion's effect.

Returns
A string describing the potion.

Implements RpgGame.Items.IItem.

◆ OnDrop()

void RpgGame.Items.Thorn.OnDrop ( Level  level,
Player  player 
)
inline

Just here to satisty the IItem interface.

Parameters
levelThe current level.
playerThe player dropping the potion.

Implements RpgGame.Items.IItem.

◆ OnPickup()

bool RpgGame.Items.Thorn.OnPickup ( Player  player,
Inventory  inventory 
)
inline

Applies damage to the player when they step on the thorn.

Parameters
playerThe player picking up the potion.
inventoryThe player's inventory (not used as the potion is consumed).
Returns
False, as thorns are not removed from the map when stepped on.

Implements RpgGame.Items.IItem.

Here is the call graph for this function:

Property Documentation

◆ color

ConsoleColor RpgGame.Items.Thorn.color
get

Gets the color of the potion when rendered.

Implements RpgGame.Items.IItem.

◆ Name

string RpgGame.Items.Thorn.Name
get

Gets the name of the potion.

Implements RpgGame.Items.IItem.

◆ Symbol

char RpgGame.Items.Thorn.Symbol
get

Gets the character symbol representing the potion on the map.

Implements RpgGame.Items.IItem.


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