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
Afficher le fichier Open project: propra13-orga/gruppe22 Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

ClearQuests() public méthode

Reset the list of quests
public ClearQuests ( ) : void
Résultat void

HideQuest() public méthode

public HideQuest ( int id ) : void
id int
Résultat void

Interact() public méthode

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
Résultat void

NPC() public méthode

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
Résultat System