-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharacter.js
87 lines (83 loc) · 1.37 KB
/
character.js
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const Character = {
Name: "",
Sex: "",
Race: "",
Hp: 10,
//Mana: 35,
Level: 2,
Exp: 0,
Damage: 5,
};
// this._foo means that its "private" and not "public" // only classes can make true private with the # symbol.
// getters
/* get Name() {
* return this._Name;
* },
* get Sex() {
* return this._Sex;
* },
* get Race() {
* return this._Race;
* },
* get Hp() {
* return this._HP;
* },
* get Mana() {
* return this._Mana;
* },
* get Level() {
* return this._Level;
* },
* get Exp() {
* return this._Exp;
* },
* get Damage() {
* return this._Damage;
* },
* // setters
* set Name(name) {
* this._Name = name;
* },
* set Sex(sex) {
* this._Sex = sex;
* },
* set Race(race) {
* this._Race = race;
* },
* set Hp(hp) {
* this._hp = hp;
* },
* set Mana(mana) {
* this._Mana = mana;
* },
* set Level(level) {
* this._Level = level;
* },
* set Exp(exp) {
* this._Exp = exp;
* },
* set Damage(damage) {
* this._Damage = damage;
* },
* setRace(raceObj) {
* this.Race = raceObj.Race;
* this.Hp = raceObj.Hp;
* }, */
const sex = {
Male: "Male",
Female: "Female",
};
// // getters
// get Male() {
// return this._Male;
// },
// get Female() {
// return this._Female;
// },
// // setters
// set Male(male) {
// this.Male = male;
// },
// set Female(female) {
// this.Female = female;
// },