public override void Hit(AbilityHitDetector.ChallengeStates state, bool hiding)
    {
        if (state != AbilityHitDetector.ChallengeStates.NONE)
        {
            int amnt = 0;

            if (state == AbilityHitDetector.ChallengeStates.HIDDEN || hiding)
            {
                amnt = p_Hidden;
            }
            else if (state == AbilityHitDetector.ChallengeStates.NONE)
            {
                amnt = 0;
            }
            else if (state == AbilityHitDetector.ChallengeStates.ONGOING)
            {
                amnt = p_Failure;
            }

            CloutHandler.alterClout(amnt);
        }
    }
    public override void Check(AbilityHitDetector.ChallengeStates state, GameObject player)
    {
        if (state != AbilityHitDetector.ChallengeStates.NONE)
        {
            if (!PS.isPlaying)
            {
                PS.Play();
                SoundManager.AddSound(yawn);
                SoundManager.ChangeVolume(yawn, 0.1f);
            }
            if (Vector3.Distance(player.transform.position, otherStudent.transform.position) <= 6)
            {
                close = true;
            }
            else
            {
                close = false;
            }

            if (fill >= 1)
            {
                Destroy(Hat.gameObject);
                close    = false;
                complete = true;
                alert    = false;
            }
            else if (fill <= 0)
            {
                Destroy(Hat.gameObject);
                close    = false;
                complete = true;
                alert    = true;
            }

            if (fill >= 0.75f && !se)
            {
                se = true;
                scan();
            }

            if (!complete)
            {
                if (close)
                {
                    zeroOne += Time.deltaTime * 2;
                }
                else
                {
                    zeroOne -= Time.deltaTime * 2;
                }

                zeroOne = Mathf.Clamp(zeroOne, 0, 1);
            }
            else
            {
                zeroOne -= Time.deltaTime * 2;
            }

            pb.alpha = Mathf.Lerp(0, 1, zeroOne);
            pb.gameObject.GetComponent <RectTransform>().localPosition = new Vector3(0, Mathf.Lerp(-50, 20, zeroOne), 0f);

            if (close && !complete)
            {
                if (!pup)
                {
                    StartCoroutine(pop());
                }
                if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.Q))
                {
                    fill += 0.01f;
                }
                else
                {
                    fill -= 0.0005f;
                }
                over.fillAmount = fill;
            }
        }

        if (alert)
        {
            PS.Stop();
            setState(cStates.ALERT);
        }
        else if (complete)
        {
            StartCoroutine(ScriptedEvent());
            setState(cStates.COMPLETED);
        }

        if ((alert || complete) && pb.alpha == 0 && pb.gameObject.GetComponent <RectTransform>().localPosition == new Vector3(0, -50, 0f))
        {
            Finalized = true;
        }
    }