Ejemplo n.º 1
0
 public void StartActivated()
 {
     Activated         = true;
     CurFuel           = MaxFuel * .75f;
     MyRenderer.sprite = OnlineSprites[0];
     FuelBar.Show();
     AttachedCircuit.TurnOn();
 }
Ejemplo n.º 2
0
	// 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) + ">";
    }