Beispiel #1
0
        public async Task CreateTeam(TeamData team)
        {
            await teamMapper.SaveTeam(ApplicationData.PlayerId, team);

            HasTeam = true;
            Team    = team;
            OnTeamLoad?.Invoke(team);
        }
Beispiel #2
0
        public async Task DeleteTeam()
        {
            await teamMapper.DeleteTeam(ApplicationData.PlayerId);

            HasTeam = false;
            Team    = null;
            OnTeamLoad?.Invoke(null);
        }
Beispiel #3
0
 private TeamManager()
 {
     teamMapper.GetTeam(ApplicationData.PlayerId).ContinueWith(team =>
     {
         HasTeam = !team.IsFaulted && team.Result != null;
         Team    = team.Result;
         OnTeamLoad?.Invoke(Team);
     });
 }