void OnTriggerEnter2D(Collider2D collider)
    {
        OverworldCharacter charScript = collider.gameObject.GetComponent <OverworldCharacter>();

        if (charScript != null)
        {
            SceneManager.LoadScene(sceneToStart);
        }
    }
Esempio n. 2
0
    private void Awake()
    {
        if (isMainCharacter)
        {
            if (MainCharacter != null)
            {
                throw new Exception("Multiple main characters detected");
            }
            MainCharacter = this;
        }
        _humanoidAnimator = GetComponent <HumanoidAnimator>();

        StartCoroutine(_Test());
    }