Exemplo n.º 1
0
 void Update()
 {
     delta = Time.deltaTime;
     stateManager.Tick(delta);
     ResetInput();
 }
Exemplo n.º 2
0
 void Update()
 {
     delta = Time.deltaTime;
     states.Tick(delta);
 }
Exemplo n.º 3
0
 public void Update()
 {
     delta = Time.deltaTime;
     cameraManager.Tick(delta);
     states.Tick(delta);
 }
Exemplo n.º 4
0
 void Update()
 {
     delta = Time.deltaTime;
     states.Tick(delta);
     ResetInputNStates();
 }
Exemplo n.º 5
0
        void Update()
        {
            delta = Time.deltaTime;
            if (a_input)
            {
                a_input_count++;
            }
            Debug.Log(delta);
            states.Tick(delta);
            if (!dialogueManager.dialogueActive)
            {
                if (states.pickManager.itemCandidate != null || states.pickManager.interactionCandidate != null)
                {
                    if (states.pickManager.itemCandidate && states.pickManager.interactionCandidate)
                    {
                        if (preferItem)
                        {
                            PickupItem();
                        }
                        else
                        {
                            Interact();
                        }
                    }

                    if (states.pickManager.itemCandidate && !states.pickManager.interactionCandidate)
                    {
                        PickupItem();
                    }

                    if (!states.pickManager.itemCandidate && states.pickManager.interactionCandidate)
                    {
                        Interact();
                    }
                }
                else
                {
                    uiManager.CloseInteractCard();
                    if (uiManager.announceCard[0].gameObject.activeSelf == true ||
                        uiManager.announceCard[1].gameObject.activeSelf == true ||
                        uiManager.announceCard[2].gameObject.activeSelf == true ||
                        uiManager.announceCard[3].gameObject.activeSelf == true ||
                        uiManager.announceCard[4].gameObject.activeSelf == true)
                    {
                        close_timer += 1;
                    }
                    if (close_timer > 190)
                    {
                        close_timer = 0;
                        uiManager.CloseAnnounceCard();
                        a_input = false;
                    }
                }
            }
            else
            {
                uiManager.CloseInteractCard();
            }

            if (a_input_count > 1f)
            {
                a_input       = false;
                a_input_count = 0;
            }


            dialogueManager.Tick(a_input);
            states.MonitorStats();
            ResetInputNState();
            uiManager.Tick(states.characterStats, delta, states);
        }