Exemple #1
0
 protected override void Activate()
 {
     if (CanSwitchWorld() && Player.CanSwitchWorld() && !UIPowerBar.IsEmpty())
     {
         Switch();
         GameManager.SwitchWorld();
         animator.SetTrigger("zoomIn");
     }
 }
Exemple #2
0
    // Update is called once per frame
    void LateUpdate()
    {
        if (!isPaused && Player.HasOrbem())
        {
            if (Player.CanSwitchWorld() && UIPowerBar.IsEmpty() && !WorldManager.IsWorldFuture() && MaskController.CanBeOpenedOrClosed())
            {
                StartCoroutine(TeleportToFuture());
            }


            if (Input.GetButtonDown("Open/Close Gate") && CanSwitchWorld())
            {
                SwitchWorld();
            }

            if (WorldManager.IsWorldFuture() && Input.GetButtonDown("MiniMap") && !UIPowerBar.IsEmpty())
            {
                MiniMapController.SwitchMiniMapState();
            }

            if (Input.GetKeyDown("v"))
            {
                Debug.Log("Start decrease");
                UIPowerBar.StartDecrease(2f);
            }

            if (Input.GetKeyDown("b"))
            {
                Debug.Log("Start regen");
                UIPowerBar.StartRegen();
            }
        }


        if (Input.GetButtonDown("Pause"))
        {
            if (isPaused)
            {
                Resume();
                UIManager.HidePauseMenu();
            }
            else
            {
                Pause();
                UIManager.DisplayPauseMenu();
            }
        }

        // delay next update by 1 frame to prevent from "jumping" with a controller
        if (isPaused && pauseExited)
        {
            isPaused    = false;
            pauseExited = false;
        }
    }
Exemple #3
0
 public bool CanSwitchWorld()
 {
     return(Player.CanSwitchWorld() && !UIPowerBar.IsEmpty() && MaskController.CanBeOpenedOrClosed());
 }