public async Task <bool> LoadTeam(int teamID)
        {
            //Run a Get request to pull down the full team data
            //If it fails to get team, refresh team list
            //Otherwise launch into game menu
            bool            loaded     = false;
            INETeamSelector selectTeam = new INETeamSelector();

            selectTeam.Team = teamID;

            INETeamResponse team = await INE.PostData <INETeamResponse>("team", selectTeam);

            if (team.Team == teamID)
            {
                Debug.Log(string.Format("Team[{1}] {0}, returned", team.TeamName, team.Team));
                loaded = true;
                List <INECharacterResponse> characters = await INE.PostData <List <INECharacterResponse> >("team/character/list", selectTeam);

                if (characters.Count == 0)
                {
                    CreateInitialCharacter();
                }
                //else load up the team ui stuff
            }
            else
            {
                Debug.Log(string.Format("Team[{1}] {0}, mismatch", team.TeamName, team.Team));
            }

            return(loaded);
        }
        public async Task <bool> LoadTeamList()
        {
            bool listPopulated = false;

            TeamList = await INE.GetData <List <INETeamEntryResponse> >("team/list/");

            if (TeamList != null && TeamList.Count > 0)
            {
                listPopulated = true;
            }

            return(listPopulated);
        }
        public async Task <int> CommitNewTeam(string newTeamName)
        {
            int teamCreated = -1;

            if (Regex.IsMatch(newTeamName, INE.Format.ValidNamePattern))
            {
                INENewTeamResponse result = await INE.PostData <INENewTeamResponse>("team/new", new INENewTeamPost( newTeamName ));

                if (result != null)
                {
                    teamCreated = result.Team;
                    Debug.Log(string.Format("Team {0} created.", result.Team));
                }
            }

            return(teamCreated);
        }
Example #4
0
        private async void INEPost()
        {
            string results = await INE.PostDataAsJson(Path.text, BodyJson.text);

            Results.text = results;
        }
Example #5
0
        private async void INEGet()
        {
            string results = await INE.GetDataAsJson(Path.text);

            Results.text = results;
        }
Example #6
0
 public void ClickSignOut()
 {
     INE.SignOut();
 }
Example #7
0
 private async void INELogin()
 {
     await INE.Login(UsernameInput.text, PasswordInput.text);
 }