// Use this for initialization
	void Start () {
        populationBar = transform.Find("PopulationBar").GetComponent<ResourceBar>();
        populationBar.Initialize();
        populationBar.Hide(0);

        energyBar = transform.Find("EnergyBar").GetComponent<ResourceBar>();
        energyBar.Initialize();
        if (SceneManager.GetActiveScene().buildIndex != GameManager.SystemLevel) {
            energyBar.Hide(0);
        }
        else {
            energyBar.Show(0);
        }

        spacebuxBar = transform.Find("SpacebuxBar").GetComponent<ResourceBar>();
        spacebuxBar.Initialize();
        spacebuxBar.Show(0);

        // TO DO literally just copy and paste this for population and power
        spacebuxBar.Value = PlayerData.instance.Spacebux;
        if (virtualPosition != null)
            virtualPosition.text = "Position: <" + Mathf.FloorToInt(GameManager.instance.virtualPosition.x) + " , " + Mathf.FloorToInt(GameManager.instance.virtualPosition.y) + ">";
    }
Beispiel #2
0
 public void StartDeactivated()
 {
     Activated         = false;
     MyRenderer.sprite = OfflineSprite;
     FuelBar.Hide();
 }