Esempio n. 1
0
    public void stopChasingMe()
    {
        WitchLogic witchLogic = FindObjectOfType <GameManager>().getWitch().GetComponent <WitchLogic>();

        witchLogic.stopChasing();

        changeMaterial(ogMaterial);
        setGlowing(false);
        setHidden(false);
    }
    public override void OnStateExit(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex)
    {
        targetPlayer.GetComponent <Animator>().SetBool("isCaught", false);
        targetPlayer.GetComponent <Animator>().SetBool("isGettingUp", true);
        //deactivate prompt message
        gameManager.deactivateResistanceSlider(targetPlayer);
        witchLogic.stopChasing();

        // reset fields
        canPlayerResist = false;
        freePlayer      = false;
        targetPlayer.GetComponentInChildren <CameraShake>().setPower(0f);
        targetPlayer.GetComponentInChildren <CameraShake>().setResistanceMeter(0f);

        fruitLossRate = originalFruitLossRate;
        fruitDropTime = originalFruitDropTime;

        hasPlayedSound = false;
    }