/
PlayerClass.cs
92 lines (78 loc) · 2.15 KB
/
PlayerClass.cs
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
88
89
90
91
92
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerClass
{
public SpellClass[] spellsArray = new SpellClass[13];
private string[] NamesArray = new string[13];
private float num = 15f;
private int Level;
private float Hp;
private float TotalHp;
private float TotalStamina;
private float Stamina;
private float StaminaBonus;
public PlayerClass(int level, float hp, float stamina)
{
this.Level = level;
this.Hp = hp;
this.TotalStamina = stamina;
this.Stamina = stamina;
this.TotalHp = hp;
this.StaminaBonus = 14 + Level;
NamesArray[0] = "SnowFlakesAttack";
NamesArray[1] = "FogAttack";
NamesArray[2] = "WaterFallAttack";
NamesArray[3] = "HailAttack";
NamesArray[4] = "IciclesAttack";
NamesArray[5] = "IceBallAttack";
NamesArray[6] = "IceFieldAttack";
NamesArray[7] = "WhirlpoolAttack";
NamesArray[8] = "AvalancheAttack";
NamesArray[9] = "TsunamiAttack";
NamesArray[10] = "MagicRenewal";
NamesArray[11] = "Shield";
NamesArray[12] = "Heal";
for (int i = 0; i<spellsArray.Length; i++)
{
if (i <= 9)
{
spellsArray[i] = new SpellClass(NamesArray[i], (num + i * 5), (num + i * 5));
}
if(i == 10)
spellsArray[i] = new SpellClass(NamesArray[i], -20f, 0f);//change it that it will be dependent in the level
if (i == 12)
spellsArray[i] = new SpellClass(NamesArray[i], 20f, 20f);//change it that it will be dependent in the level
if (i == 11)
spellsArray[i] = new SpellClass(NamesArray[i], 0f, 0f);//change it that it will be dependent in the level
}
}
public float getStaminaPlayer()
{
return this.Stamina;
}
public float getTotalStaminaPlayer()
{
return this.TotalStamina;
}
public float getStaminaBonus()
{
return this.StaminaBonus;
}
public float getHpPlayer()
{
return this.Hp;
}
public float getTotalHpPlayer()
{
return this.Hp;
}
public void setTotalStamina(float numb)
{
this.TotalStamina = numb;
}
public void setTotalHpPlayer(float numb)
{
this.TotalHp = numb;
}
}