Esempio n. 1
0
        public async Task <Player> CreatePlayer(string deviceID, NewPlayer player)
        {
            Player newPlayer = new Player()
            {
                DeviceID      = deviceID,
                Name          = player.Name,
                Gender        = player.Gender,
                SkinType      = player.SkinType,
                HairColor     = player.HairColor,
                ShirtColor    = player.ShirtColor,
                TrousersColor = player.TrousersColor,
                CreationTime  = DateTime.UtcNow,
                Achievements  = new List <Achievement>(),
                Dodos         = new List <Dodo>(),
                PassedLevels  = new List <int>()
            };

            await _playerCollection.InsertOneAsync(newPlayer);

            return(newPlayer);
        }
 public Task <List <Achievement> > AddTestAchis(NewPlayer player)
 {
     return(_IRepo.AddTestAchis());
 }
 public Task <Player> CreatePlayer(string deviceID, NewPlayer player)
 {
     return(_IRepo.CreatePlayer(deviceID, player));
 }