Exemple #1
0
    void OnCollisionEnter2D(Collision2D bonu)
    {
        RubyController controller = bonu.gameObject.GetComponent <RubyController>();

        if (controller != null)
        {
            controller.ChangeBonus(1);
            Destroy(gameObject);
        }
    }