예제 #1
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            ToggleSettings();
        }
        if (activateDecline)
        {
            /*
             * HERE WE NEED A TIMER
             */
            if (_currentTimeForDecline > 0)
            {
                _currentTimeForDecline -= Time.deltaTime;
                //Update Text
                UIObjects.Instance.DeclineText.text = "Remaining... " + (int)_currentTimeForDecline;
                Debug.Log($"Timer -> {(int) _currentTimeForDecline} <-");
            }
            else
            {
                _currentTimeForDecline = 4f;
                LookForGame.SetFGButtons();
                if (!hasAnswered)
                {
                    ClientSend.MatchFoundAnswer(false);
                    Debug.Log("Match auto declined");
                }

                UIObjects.Instance.MatchFoundUI.GetComponent <Canvas>().enabled = false;
                activateDecline = false;
            }
        }

        UIObjects.Instance.loadingBarImage_Login.fillAmount += 0.005f;
        if (!(Math.Abs(UIObjects.Instance.loadingBarImage_Login.fillAmount - 1f) < 0.01f))
        {
            return;
        }
        UIObjects.Instance.loadingBarImage_Login.fillClockwise = !UIObjects.Instance.loadingBarImage_Login.fillClockwise;
        UIObjects.Instance.loadingBarImage_Login.fillAmount    = 0;
    }
예제 #2
0
 public static void InteractableButtons(Packet _packet)
 {
     LookForGame.SetInteract();
 }
예제 #3
0
 public static void MMState(Packet _packet)
 {
     LookForGame.SetFGButtons();
 }