Ejemplo n.º 1
0
    public override IEnumerator effect()
    {
        Players player = GameController.getInstance().getPlayer();

        Blink blink = player.gameObject.AddComponent <Blink> ();

        blink.StartEffect(2f);

        player.speed = (float)(playerSpeed / 1.5);

        yield return(new WaitForSeconds(2f));

        player.speed = playerSpeed;
    }
Ejemplo n.º 2
0
    IEnumerator effect(Players player)
    {
        SpikeActive = false;

        Blink blink = player.gameObject.AddComponent <Blink> ();

        blink.StartEffect(2f);

        player.speed = playerSpeed / 2;
        player.takeDamage(damage);

        yield return(new WaitForSeconds(2f));

        player.speed = playerSpeed;
        SpikeActive  = true;
    }