Class TPlayer

Unit

Declaration

type TPlayer = class(TEntity)

Description

A class representing the Player.

It inherits most of its interface from its parent: TEntity. Additionally some following fields are defined

The following fields are redefined.

Hierarchy

Overview

Methods

Public constructor Create(aname, aklasse: string; ahealth, adamage: integer);
Public procedure print_stats;
Public function attack(aenemy: TEntity): integer;

Properties

Public property klasse: string read _klasse;
Public property inventory: TInventory read _inventory;

Description

Methods

Public constructor Create(aname, aklasse: string; ahealth, adamage: integer);

constructor for the player

Parameters
aname
The name of the player.
aklasse
The "league" of the player.
ahealth
The initial and therefore maximum health of the player.
adamage
The initial damage the player should make.
Returns

A new instance of TPlayer.

Public procedure print_stats;

Procedure to print the current stats of the player.

Public function attack(aenemy: TEntity): integer;
 

Properties

Public property klasse: string read _klasse;

Read-only String-property representing the players "league".

Public property inventory: TInventory read _inventory;
 

Generated by PasDoc 0.16.0.