forked from GCSShatteredSpace/Week-2-Code-Reading
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupgradeStats.cs
35 lines (29 loc) · 881 Bytes
/
upgradeStats.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
using UnityEngine;
using System.Collections;
public class upgradeStats : MonoBehaviour {
public weaponProperties upgrade;
public GameObject controller;
public statsController sctrl;
public string upgradeName;
public bool[] isValid;
public bool installed;
public int damage;
public int range;
public int delay;
public string special;
public int spAmount;
//I haven't examined this bit for a long time
//Just pretend it doesn't exist
//This is supposed to be somewhere to store info on all the upgrade
void Start () {
upgrade = this.gameObject.AddComponent <weaponProperties>();
upgrade.damage = damage;
upgrade.range = range;
upgrade.delay = delay;
upgrade.special = special;
upgrade.spAmount = spAmount;
controller = GameObject.Find("gameData");
sctrl = controller.GetComponent<statsController> ();
isValid = new bool[sctrl.maxWeapons];
}
}