public override void Activate(PowerupUser player) { AudioSource.PlayClipAtPoint(BoostContSFX, player.transform.position, PlayerPrefs.GetFloat("SFXVolume", 1)); base.Activate(player); PlayerCarController pcc = player.GetComponent <PlayerCarController>(); StatusEffectManager manager = player.GetComponent <StatusEffectManager>(); manager.ApplyEffect(new BoostEffectContinuous(pcc), EffectTime); }
private void OnTriggerEnter(Collider other) { PlayerCarController player = other.GetComponent <PlayerCarController>(); StatusEffectManager manager = other.GetComponent <StatusEffectManager>(); if (player != null) { manager.ApplyEffect(new SpikeTrapEffect(player), EffectTime); } }