// Use this for initialization void Start() { myRend = GetComponent<Renderer>(); myAudio = GetComponent<AudioSource>(); coffeeMeterObj = GameObject.Find("CoffeeImage"); coffeeMeter = coffeeMeterObj.GetComponent<CoffeeMeter>(); }
// Use this for initialization void Start() { CoffeeMeter coffeeMeter = gameObject.GetComponent <CoffeeMeter>(); }