// Use this for initialization void Start() { flashlight = Instantiate (Resources.Load ("Light"), Camera.main.transform.position, Camera.main.transform.rotation) as GameObject; flashlight.transform.parent = gameObject.transform; gestoreEnergia = GetComponent<GestoreEnergia>(); on= false; }
// Use this for initialization void Start() { on = false; gestoreEnergia = (GameObject.Find("Player")).GetComponent<GestoreEnergia> (); calore = Resources.Load<Material> ("Calore"); poBombe = GetComponentsInChildren<PossibileBomba> (); foreach (PossibileBomba poBomba in poBombe) { if (poBomba.bomba) { originale = poBomba.renderer.material; } } }
void OnStart() { gestoreEnergia = GetComponent<GestoreEnergia>(); }
// Use this for initialization void Start() { manager = GameObject.Find("Player").GetComponent<GestoreEnergia>(); }
// Use this for initialization void Start() { c = GetComponent<Rigidbody>(); gestoreEnergia = GetComponent<GestoreEnergia>(); }