Exemple #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.GetComponent <Racer>() && GameManager.instance.currentGameState == GameState.InGame)
     {
         other.GetComponent <Racer>().UpdateIndex();
         GameManager.instance.EarnKillScore(other.GetComponent <Racer>().racerIndex);
         GameManager.instance.EarnMoney(moneyReward);
         myCar.CoinFX();
         myCar.hostingEnemy = false;
         Invoke("DeathCheck", 5f);
         ragdoll.ToggleRagdoll(other.transform.position);
     }
 }