void ShowSpeedBooster(bool state) { SpeedBooster speedBooster = FindObjectOfType <SpeedBooster>(); speedBooster.Show(state); speedBooster.ChangePosition(); }
private void BackToOriginalSpeed() { uiController.ShowPerkSpeedbooster(false); playerController.SetSpeed(originalSpeed); SpeedBooster speedBooster = FindObjectOfType <SpeedBooster>(); speedBooster.Show(true); }
void OnCollisionStay(Collision collisionInfo) { SpeedBooster booster = collisionInfo.gameObject.GetComponent <SpeedBooster>(); if (booster) { boost = true; } }