void Start() { animator = GetComponent <Animator>(); GameObject manager = GameObject.Find("CoolingGameManager"); moleculeManager = manager.GetComponent <CoolingMoleculeManager>(); powerManager = manager.GetComponent <CoolingPowerManager>(); // Initialize starting state animator.SetFloat("animSpeed", 0.6f); lamps[0].GetComponent <Renderer>().material.SetColor("_EmissionColor", Color.green); lamps[1].GetComponent <Renderer>().material.SetColor("_EmissionColor", Color.green); powerLevel = 2; powerConsume = powerLevel * 30; powerManager.UpdatePowerConsume('P', powerConsume); }
void Start() { animator = GetComponent <Animator>(); spawn = GetComponent <CoolingSpawnScript>(); powerManager = GameObject.Find("CoolingGameManager").GetComponent <CoolingPowerManager>(); radiatorPowerText = GameObject.Find("RadiatorPowerText").GetComponent <Text>(); // Initialize starting state animator.SetFloat("animSpeed", 1.0f); lamps[0].GetComponent <Renderer>().material.SetColor("_EmissionColor", Color.green); lamps[1].GetComponent <Renderer>().material.SetColor("_EmissionColor", Color.green); powerLevel = 2; powerConsume = powerLevel * 30; spawn.temperatureAmount = powerLevel * -temperatureReducementFactor; powerManager.UpdatePowerConsume('R', powerConsume); }