Ejemplo n.º 1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        RubyController controller = other.GetComponent <RubyController> ();

        if (controller != null)
        {
            controller.AddCogs();
            controller.PlaySound(collectedClip);
            Destroy(gameObject);
        }
    }