C# Class Gruppe22.Backend.NPC

The class used to generate NPCs. NPCs can either tell a story to the player or have a shop.
Inheritance: Actor
ファイルを表示 Open project: propra13-orga/gruppe22 Class Usage Examples

Public Methods

Method Description
AddQuest ( Quest q ) : void

Add quest to the player. This shoud be used from NPC(dialog).

ClearQuests ( ) : void

Reset the list of quests

HideQuest ( int id ) : void
Interact ( Actor With ) : void

Method to interact with a NPC. Either opens the NPC's shop or his dialogue. Calls the Eventhandler.

NPC ( int health = 10, int armor, int damage, int maxHealth = 10, string name = "", Random r = null, int _level = 1, bool shop = false ) : System

The constructor for a NPC. Initializes the standard properties and graphics for that NPC. See actor for the params.

Method Details

AddQuest() public method

Add quest to the player. This shoud be used from NPC(dialog).
public AddQuest ( Quest q ) : void
q Quest The quest.
return void

ClearQuests() public method

Reset the list of quests
public ClearQuests ( ) : void
return void

HideQuest() public method

public HideQuest ( int id ) : void
id int
return void

Interact() public method

Method to interact with a NPC. Either opens the NPC's shop or his dialogue. Calls the Eventhandler.
public Interact ( Actor With ) : void
With Actor The actor with which should be interacted
return void

NPC() public method

The constructor for a NPC. Initializes the standard properties and graphics for that NPC. See actor for the params.
public NPC ( int health = 10, int armor, int damage, int maxHealth = 10, string name = "", Random r = null, int _level = 1, bool shop = false ) : System
health int
armor int
damage int
maxHealth int
name string
r System.Random
_level int
shop bool
return System