Beispiel #1
0
 private void SignIn()
 {
     if (ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.B, PlayerID.One))
     {
         state = Enums.UIStates.Splash;
         UpdatePanels(SplashPanel);
     }
     if (ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.Start, PlayerID.One))
     {
         string text = SignInPanel.FindChild("NameCreator").FindChild("LetterHolder").GetComponent <NameCreator>().t.text;
         if (text.Length == 4)
         {
             ProfileData pd = new ProfileData(text);
             ProfileManager.instance.AddProfile(pd);
             SignInToMain();
         }
     }
 }
Beispiel #2
0
 private void SignIn()
 {
     if (ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.B, PlayerID.One))
     {
         SignInPanel.FindChild("NameCreator").FindChild("LetterHolder").GetComponent <NameCreator>().Reset();
         state = Enums.UIStates.Splash;
         UpdatePanels(SplashPanel);
         SFXManager.instance.PlayNegative();
         ControllerManager.instance.AllowPlayerRemoval(ControllerInputWrapper.Buttons.B);
     }
     if (ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.Start, PlayerID.One))
     {
         NameCreator nameCreator = SignInPanel.FindChild("NameCreator").FindChild("LetterHolder").GetComponent <NameCreator>();
         string      text        = nameCreator.t.text;
         if (text.Length > 0 && text.ToCharArray()[text.Length - 1] != ' ')
         {
             nameCreator.Reset();
             ProfileData pd = new ProfileData(text);
             ProfileManager.instance.AddProfile(pd);
             SignInToMain();
             SFXManager.instance.PlayAffirm();
         }
     }
 }