Exemple #1
0
    void OnTriggerStay2D(Collider2D other)
    {
        TumbaController controller = other.GetComponent <TumbaController>();

        ScoreTextScript.coinAmout -= 1;

        /*if (controller != null)
         * {
         *  //the controller will take care of ignoring the damage during the invincibility time.
         *  controller.ChangeHealth(-1);
         * }*/
    }
Exemple #2
0
    void OnCollisionStay2D(Collision2D other)
    {
        if (repaired)
        {
            return;
        }

        TumbaController controller = other.collider.GetComponent <TumbaController>();


        //if(controller != null)
        //ScoreTextScript.coinAmout += 1;
        //controller.ChangeHealth(-1);
    }