Esempio n. 1
0
    public IEnumerator LateStart()
    {
        if (EnableStartEvent)
        {
            GameObject player = GameObject.FindGameObjectWithTag("Player");
            player.transform.CopyValues(IsabelleStartPoint);

            WhiteOutCanvas canvas = FindObjectOfType <WhiteOutCanvas>();
            canvas.GetComponent <Animator>().SetTrigger("Black");
            RabbitReminderTrigger.SetActive(false);
            // Need late start to make sure everything has been initialized.
            yield return(new WaitForEndOfFrame());

            canvas.GetComponent <Animator>().SetTrigger("FadeIn");
            CharacterMovement charMove = FindObjectOfType <CharacterMovement>();
            charMove.OverrideMovementVector = Vector2.right;

            StartCoroutine(RestoreCharacterControls(4f));
        }
    }
Esempio n. 2
0
    public void Ending()
    {
        CameraMan cameraMan = FindObjectOfType <CameraMan>();

        cameraMan.IsCinematic = true; // lol.

        WhiteOutCanvas canvas = FindObjectOfType <WhiteOutCanvas>();

        canvas.GetComponent <Animator>().SetTrigger("FadeOut");

        CharacterMovement charMove = FindObjectOfType <CharacterMovement>();

        charMove.OverrideMovementVector = Vector2.left;
        StartCoroutine(RestoreCharacterControls(3.5f));

        StartCoroutine(RestartGame());
    }
Esempio n. 3
0
    public void DestroyStatue()
    {
        DestroyStatueTrigger.SetActive(true);

        CameraMan cameraMan = FindObjectOfType <CameraMan>();

        cameraMan.IsCinematic = true; // lol.

        GameObject thing = GameObject.Find("BrokenThingWeapon");

        thing.transform.parent = null;
        Animator thingAnim = thing.GetComponent <Animator>();

        thingAnim.SetTrigger("Shoot");

        WhiteOutCanvas canvas = FindObjectOfType <WhiteOutCanvas>();

        canvas.GetComponent <Animator>().SetTrigger("Explode");

        StartCoroutine(DestoryStatueAnimation());
    }