Exemplo n.º 1
0
 private void Start()
 {
     cow         = FindObjectOfType <Cow>();
     pasteurizer = FindObjectOfType <Pasteurizer>();
     pail        = FindObjectOfType <Pail>();
     churner     = FindObjectOfType <Churner>();
 }
Exemplo n.º 2
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        Pasteurizer pasteurizer = other.GetComponent <Pasteurizer>();

        if (pasteurizer != null)
        {
            SetFill(false);
            pasteurizer.MilkDragged();
            return;

            AkSoundEngine.PostEvent("TapCow", gameObject);
        }

        Churner churner = other.GetComponent <Churner>();

        if (churner != null)
        {
            SetFill(false);
            churner.MilkDragged();
            return;
        }
    }