-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSavedData.cs
More file actions
63 lines (49 loc) · 1.67 KB
/
SavedData.cs
File metadata and controls
63 lines (49 loc) · 1.67 KB
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
using UnityEngine;
using System.Collections;
public class SavedData : MonoBehaviour {
public GameObject gameManager;
Player_party plist;
Player_Stats playerstats;
// Use this for initialization
void Start () {
plist = gameManager.GetComponent<Player_party>();
playerstats = gameManager.GetComponent<Player_Stats>();
}
public void InitPlayerParty()
{
playerstats.ability1 = " ";
playerstats.ability2 = " ";
playerstats.ability3 = " ";
playerstats.ability4 = " ";
playerstats.attackdam = 10;
playerstats.exp = 0;
playerstats.health = 100;
playerstats.healthMax = 100;
playerstats.mana = 20;
playerstats.manaMax = 20;
playerstats.level = 1;
playerstats.playername = "player";
for (int i = 1; i < 4; i++)
{
plist.player_party[i] = null;
}
}
public void CreatePlayerParty()
{
playerstats.ability1 = " ";
playerstats.ability2 = " ";
playerstats.ability3 = " ";
playerstats.ability4 = " ";
playerstats.attackdam = 10;
playerstats.exp = 0;
playerstats.health = 100;
playerstats.healthMax = 100;
playerstats.mana = 20;
playerstats.manaMax = 20;
playerstats.level = 1;
playerstats.playername = "player";
plist.player_party[1] = Resources.Load("Prefabs/Monsters/pet Blue Dragon") as GameObject;
plist.player_party[2] = Resources.Load("Prefabs/Monsters/pet Green Adult Dragon") as GameObject;
plist.player_party[3] = Resources.Load("Prefabs/Monsters/pet Baby Red Dragon") as GameObject;
}
}