Beispiel #1
0
 public void OneVOneOnClick()
 {
     GetComponent <CanvasGroup>().interactable = false;
     SyncActions = false;
     PopUpNotification.Push("Do you want to queue up for " + MyText.Colofied(" Arena 1v1", "yellow") + "?", PopUpNotification.Type.Select);
     StartCoroutine(PopUpNotification.WaitForDecisionThenPerformAction(QueueUpArena, CancelRequest));
 }
Beispiel #2
0
 private void PopQueueEntrance(Decipher decipher)
 {
     Interaction.TurnOffAllInteractionWindow();
     ControllerManager.SyncActions = false;
     PopUpNotification.Push("Your queue is ready, do you want to join?", PopUpNotification.Type.Select);
     StartCoroutine(PopUpNotification.WaitForDecisionThenPerformAction(AcceptEntrance, DenyEntrance));
 }
Beispiel #3
0
        private void DisconnectByServer(Decipher decipher)
        {
            byte error;

            NetworkTransport.Disconnect(decipher.tail, ClientID, out error);
            if (decipher.content != string.Empty)
            {
                PopUpNotification.Push(decipher.content, PopUpNotification.Type.Confirm);
            }
        }
Beispiel #4
0
    IEnumerator WaitFroDeleteDecision()
    {
        PopUpNotification.Push("Are you sure?", PopUpNotification.Type.Select);
        yield return(PopUpNotification.WaitForDecision());

        if (PopUpNotification.Decision)
        {
            Client.Send(Protocols.DeleteCharacter, new DeletionData(Slot));
            PopUpNotification.Push("Waiting for server...");
        }
    }
Beispiel #5
0
 public void Login()
 {
     if (DataManager.Username == null)
     {
         PopUpNotification.Push("You have not yet registered.", PopUpNotification.Type.Confirm);
     }
     else
     {
         PopUpNotification.Push("Waiting for server...", PopUpNotification.Type.Pending);
         Client.Connect();
         StartCoroutine(CheckConnectionAndSendRequest(0.5f));
     }
 }
Beispiel #6
0
    private IEnumerator CheckConnectionAndSendRequest(float time)
    {
        yield return(new WaitForSeconds(time));

        if (!Client.Connected)
        {
            PopUpNotification.Push("No connection to server.", PopUpNotification.Type.Confirm);
        }
        else
        {
            Client.Send(Protocols.UserLogin, DataManager.Username);
        }
    }
Beispiel #7
0
    //public InputField Password;

    public void Register()  //This function will be disable after hook up with Steam login
    {
        if (Username.text == "" /*|| Password.text == ""*/)
        {
            PopUpNotification.Push("Username is invalid.", PopUpNotification.Type.Confirm);
        }
        else
        {
            PopUpNotification.Push("Waiting for server...", PopUpNotification.Type.Pending);
            Client.Connect();
            StartCoroutine(CheckConnectionAndSendRequest(2));
        }
    }
 public void CreatCharacter()
 {
     if (Name.text == "")
     {
         PopUpNotification.Push("Name can not be empty.", PopUpNotification.Type.Confirm);
     }
     else if (!ClassRegistered)
     {
         PopUpNotification.Push("Please select a class.", PopUpNotification.Type.Confirm);
     }
     else
     {
         PopUpNotification.Push("Waiting for server...", PopUpNotification.Type.Pending);
         CreationData CreationData = new CreationData(CacheManager.CachedPlayerSlotIndex, new RGB(R.value, G.value, B.value), Name.text, RegisteredClass);
         Client.Send(Protocols.CreateCharacter, CreationData);
     }
 }
Beispiel #9
0
 public void DeleteButtonOnClick()
 {
     PopUpNotification.Push("Are you sure?", PopUpNotification.Type.Select);
     StartCoroutine(WaitFroDeleteDecision());
 }
Beispiel #10
0
 public void PlayButtonOnClick()
 {
     CacheManager.CachedPlayerSlotIndex = Slot;
     PopUpNotification.Push("Waiting for server...");
     Client.Send(Protocols.SubscribeIdentityAndInstance, Slot);
 }
Beispiel #11
0
 private void PopUpNotify(Decipher decipher)
 {
     PopUpNotification.Push(decipher.content, PopUpNotification.Type.Confirm);
 }
Beispiel #12
0
 private void CreateUsername(Decipher decipher)
 {
     DataManager.CreateUsernameProfile(decipher.content);
     PopUpNotification.Push("Successfully registered.", PopUpNotification.Type.Confirm);
 }