Exemple #1
0
    // Update is called once per frame
    void FixedUpdate()
    {
        if (speedyTime > 0)
        {
            speedyTime          = Mathf.Max(0, speedyTime - Time.deltaTime);
            speedTrail.emitting = true;
            if (speedyTime == 0)
            {
                pS.setSpeedFactor(1);
                speedTrail.emitting = false;
            }
        }


        if (playerChoice.monsterSelection == playerScript.monsterType.BALLFELLA && speedyTime == 0)
        {
            if (Input.GetKeyDown(pS.useKey) || Input.GetButtonDown("Interact"))
            {
                speedyTime = speedyTimeMax;
                pS.setSpeedFactor(speedyBoost);
            }
        }
    }