Esempio n. 1
0
    protected override void InteractionWithPlayer(GameObject collision)
    {
        base.InteractionWithPlayer(collision);

        pointCon.AddPoint(myPoints);

        StartCoroutine(CoDeathObject());
    }
Esempio n. 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.GetComponent <Collider>().CompareTag("cube"))
     {
         ChangeLight();
         Destroy(other.gameObject);
         PointController.AddPoint();
     }
 }
 public void OnCollisionEnter2D(Collision2D other)
 {
     if (other.gameObject.tag == requiredTag)
     {
         Destroy(other.gameObject);
         PointController.AddPoint(2);
         TextField.text = PointController.Score.ToString();
     }
 }
Esempio n. 4
0
 void OnCollisionEnter2D(Collision2D coll)
 {
     if (coll.gameObject.tag == "Hole")
     {
         speed += 0.001f;
         pointController.AddPoint();
         transform.position = defaultPosition;
     }
 }
    private void OnTriggerEnter(Collider other)
    {
        //zmiana koloru swiatla
        if (other.gameObject.layer == collectiblesLayer)
        {
            ChangeLight(other);
        }

        //usuniecie doknietego obiektu
        Destroy(other.gameObject);

        //dodanie punktu
        PointController.AddPoint();
    }