Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    private void OnTriggerEnter(Collider other)
    {
        PlayerCarController player  = other.GetComponent <PlayerCarController>();
        StatusEffectManager manager = other.GetComponent <StatusEffectManager>();

        if (player != null)
        {
            manager.ApplyEffect(new SpikeTrapEffect(player), EffectTime);
        }
    }