public DecreaseAdrenaline ( float amount ) : void | ||
amount | float | |
return | void |
public void BoostHit() { moveBack = true; moveTowardsObject = false; adrenalineController.DecreaseAdrenaline(BoostCost); GetComponentInChildren <ParticleSystem>().Stop(); StartCoroutine(updateCoinAttractor(CoinAttractorExpandPeriod)); GetComponent <Animator>().SetBool("IsBoosting", false); }
void OnTriggerEnter(Collider collider) { if (collider.tag != "Player") { return; } if (collider.gameObject.GetComponent <PlayerBoost>().moveTowardsObject&& ObjectIsBoostable) { collider.gameObject.GetComponent <PlayerBoost>().BoostHit(); StartCoroutine(SplitMesh()); audioMngr.HitTreePlay(); Handheld.Vibrate(); } else { Handheld.Vibrate(); audioMngr.FailPlay(); adrenalineController.DecreaseAdrenaline(AdrenalinePenalty); collider.gameObject.GetComponent <PlayerBoost>().FixCollider1(HitSafePeriod); } }