public IHttpActionResult GetById(int gameId) { GamesServices gameService = CreateGameService(); var game = gameService.GetGameById(gameId); return(Ok(game)); }
public IHttpActionResult GetAll() { GamesServices gameService = CreateGameService(); var games = gameService.GetGame(); return(Ok(games)); }
public void OpenLeaderboard() { #if UNITY_ANDROID Action action = () => GooglePlayGames.PlayGamesPlatform.Instance.ShowLeaderboardUI(GPGConstants.leaderboard_player_scores); #else Action action = Social.ShowLeaderboardUI; #endif var scores = new Dictionary <string, long> { { GPGConstants.leaderboard_player_scores, Profile.Instance.BestScore.Long } }; GamesServices.PostScores(scores, (success, exception) => { if (success) { action(); AppMetrica.Instance.ReportEvent("PostScores"); } }); }
public GamesController(GamesServices games) { this.games = games; }
public GamesController(GamesServices gameService) { _gameService = gameService; }
public void OpenAchievements() { var achievements = new List <string>(); if (Profile.Instance.UnlockedItems.Contains(BallId.Beach)) { achievements.Add(GPGConstants.achievement_beach_ball); } if (Profile.Instance.UnlockedItems.Contains(BallId.Tennis)) { achievements.Add(GPGConstants.achievement_tennis); } if (Profile.Instance.UnlockedItems.Contains(BallId.Tomato)) { achievements.Add(GPGConstants.achievement_tomato); } if (Profile.Instance.UnlockedItems.Contains(BallId.Boomerang)) { achievements.Add(GPGConstants.achievement_boomerang); } if (Profile.Instance.UnlockedItems.Contains(BallId.Rugby)) { achievements.Add(GPGConstants.achievement_rugby_ball); } if (Profile.Instance.UnlockedItems.Contains(BallId.Football)) { achievements.Add(GPGConstants.achievement_football_ball); } if (Profile.Instance.UnlockedItems.Contains(BallId.Shoe)) { achievements.Add(GPGConstants.achievement_sneaker); } if (Profile.Instance.UnlockedItems.Contains(BallId.Banana)) { achievements.Add(GPGConstants.achievement_banana); } if (Profile.Instance.UnlockedItems.Contains(BallId.Lifebuoy)) { achievements.Add(GPGConstants.achievement_lifebuoy); } if (Profile.Instance.UnlockedItems.Contains(BallId.ToiletPaper)) { achievements.Add(GPGConstants.achievement_toilet_paper); } if (Profile.Instance.UnlockedItems.Contains(BallId.Cactus)) { achievements.Add(GPGConstants.achievement_cactus); } if (Profile.Instance.UnlockedItems.Contains(BallId.Flowerpot)) { achievements.Add(GPGConstants.achievement_flowerpot); } if (Profile.Instance.UnlockedItems.Contains(BallId.LightBeer)) { achievements.Add(GPGConstants.achievement_light_beer_bottle); } if (Profile.Instance.UnlockedItems.Contains(BallId.Bread)) { achievements.Add(GPGConstants.achievement_loaf); } if (Profile.Instance.UnlockedItems.Contains(BallId.Icecream)) { achievements.Add(GPGConstants.achievement_icecream); } if (Profile.Instance.UnlockedItems.Contains(BallId.Hammer)) { achievements.Add(GPGConstants.achievement_hammer); } if (Profile.Instance.UnlockedItems.Contains(BallId.PremiumBeer)) { achievements.Add(GPGConstants.achievement_premium_beer_bottle); } if (Profile.Instance.UnlockedItems.Contains(BallId.Pokeball)) { achievements.Add(GPGConstants.achievement_pookeball); } if (Profile.Instance.UnlockedItems.Contains(BallId.Pikachu)) { achievements.Add(GPGConstants.achievement_pookachu); } if (Profile.Instance.UnlockedItems.Contains(BallId.Grenade)) { achievements.Add(GPGConstants.achievement_grenade); } GamesServices.PostAchievements(achievements, (success, exception) => { if (success) { Social.ShowAchievementsUI(); AppMetrica.Instance.ReportEvent("PostAchievements"); } }); }
public GamesController(UnitOfWork unitOfWork) { this.data = unitOfWork; this.signInManager = new SignInManager(this.data); this.service = new GamesServices(this.data); }