Esempio n. 1
0
 void OnCollisionEnter(Collision col)
 {
     if (!ZderzylSie)
     {
         kontroller = col.gameObject.GetComponent<Player_Controller>();
         if (kontroller != null)
         {
             kontroller.GetDamage(1);
             kontroller.shorecrash = 0;
             ZderzylSie = true;
             //Debug.Log("zderzenie z brzegiem");
         }
     }
 }
Esempio n. 2
0
    void OnCollisionEnter(Collision col)
    {
        if (!ZderzylSie)
        {
            kontroller = col.gameObject.GetComponent<Player_Controller>();
            if (kontroller != null)
            {
                kontroller.GetDamage(1);

                this.collider.enabled = false;
            }

            //Debug.Log("zderzenie");

        }

        ZderzylSie = true;
    }