Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D coll)
 {
     if (coll.gameObject.name == "Runner 2D")
     {
         playerr.AddEnergy(energyValue);
         runnerObj.AddScore(scoreItem);
         if (type)
         {
             runnerObj.triggered      = false;
             runnerObj.trueTriggered  = true;
             runnerObj.falseTriggered = false;
             Debug.Log("benerr");
         }
         if (!type)
         {
             runnerObj.triggered      = false;
             runnerObj.falseTriggered = true;
             runnerObj.trueTriggered  = false;
             Debug.Log("salahh");
         }
     }
 }