Improved scripting

-Added accurate rotationPerSec & secondPerRot values!... Up to a speed
of ~720.
--Used for new idle expgain calculation in Load()
-Added scripting for assigning button events within
InitializeButtonArrays()
--stored all buttons to arrays depending on contents of the parent UI
panel's name
--mainButtons[], rotationButtons[], colorButtons[]... etc
--Future buttons will automatically exist within the array, only events
need assigning.
--Buttons do not include tick boxes, etc!
--Buttons cannot have onClick() even assigned through editor (Unity
bug?)
This commit is contained in:
2017-09-04 13:53:03 -04:00
parent ea55db656d
commit c868d738b9
4 changed files with 149 additions and 46 deletions

View File

@@ -32,11 +32,6 @@ public class ExperienceBar : MonoBehaviour {
fillAmount = currentExp / currentRequirement;
}
public void OnDestroy()
{
GameObject.FindGameObjectWithTag("GameController").GetComponent<GameManager>().Save();
}
// Update is called once per frame
void Update () {
fillAmount = currentExp / currentRequirement;