Esempio n. 1
0
    private void OnMouseUpAsButton()
    {
        anim.SetTrigger("Open");
        GameManager.Instance.GameStateChange.Invoke(GameState.Transition);

        Vector3 pos = new Vector3(transform.position.x, transform.position.y, Camera.main.transform.position.z);

        StartCoroutine(HelperTools.MoveCameraToPoint(pos, 1f));
        StartCoroutine(MoveToCaveIn(1f));
    }
Esempio n. 2
0
    IEnumerator MoveToCaveIn(float seconds)
    {
        yield return(new WaitForSeconds(seconds));

        float travelTime = 4f;

        StartCoroutine(HelperTools.MoveCameraToPoint(GameManager.Instance.CavePosition.position, travelTime));
        yield return(new WaitForSeconds(travelTime));

        GameManager.Instance.GameStateChange.Invoke(GameState.Cave);
    }