private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag.Equals("Player")) { Race_PlayerController pc = collision.GetComponent <Race_PlayerController>(); pc.Boost(camc.GetSpeed() + 1, 3); Destroy(gameObject); } }
public void RecordPlacing(Race_PlayerController player, bool won) { player.enabled = false; if (won) { placings.Insert(currentContestedPlace, player); miniManager.AddPointsToTotal(player.slot, 4 - currentContestedPlace); currentContestedPlace++; } else { placings.Insert(currentContestedPlace, player); miniManager.AddPointsToTotal(player.slot, 4 - currentLastPlace); currentLastPlace--; } }