-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNPC.h
36 lines (29 loc) · 823 Bytes
/
NPC.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef NPC_H_INCLUDED
#define NPC_H_INCLUDED
#include <iostream>
#include <string>
#include <vector>
#include "GameCharacter.h"
#include "Player.h"
#include "Item.h"
using namespace std;
class NPC: public GameCharacter
{
private:
string script;
vector<Item> commodity;
public:
NPC();
NPC(string, string, vector<Item>);
void listCommodity(); /*print all the Item in this NPC*/
/* Virtual function that you need to complete */
/* In NPC, this function should deal with the */
/* transaction in easy implementation */
void triggerEvent(Object*,Object*);
/* Set & Get function*/
void setScript(string);
void setCommodity(vector<Item>);
string getScript();
vector<Item> getCommodity();
};
#endif // NPC_H_INCLUDED