Exemplo n.º 1
0
 // ON TRIGGER ENTER
 // Destroy a box when it touches the incinerator
 // also create box fix effect & update score
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Box")
     {
         Instantiate(boxFireFX, other.transform.position, Quaternion.identity, other.transform);
         Destroy(other.gameObject, incinerateDelay);
         score.AddIncineratorScore(incineratePoints);
         DisplayFloatText(incineratePoints);
     }
 }