private void Awake() { if (instance == null) { instance = this; } }
private void Awake() { DontDestroyOnLoad(gameObject); Instance = this; PullLeaderBoard1(); PullLeaderBoard2(); }
private void StartGameManager() { try { ResourcesLoaderManager = transform.GetComponentInChildren <ResourcesLoaderManager>(); ResourcesLoaderManager.Init(); EventsManager.Init(); StatesEvents = new StatesEvents(); StatesManager = new StatesManager(); StatesManager.ChangeCurrentState(new Begin()); StatesManager.ChangeCurrentState(new Run()); PlayerEvents = new PlayerEvents(); TimerManager = new TimerManager(); PauseManager = new PauseManager(); DefeatUIManager = new DefeatUIManager(); LevelsManager = new LevelsManager(); LeaderBoardManager = new LeaderBoardManager(); //test LeaderBoardManager.GetRequestAndInstantiateIntoCanvas(); } catch (Exception e) { Debug.LogException(e); } }
public static void AppendLeaderboardEventIntro(StoryBuilderSegment segment) { StoryBuilder.AppendSpeechBubbleSegment(segment, 0, "Lets start the first portion of the Gala..."); StoryBuilder.AppendSpeechBubbleSegment(segment, 0, "We'll be checking the leaderboards and handing out prizes."); StoryBuilder.AppendSpeechBubbleSegment(segment, 0, "First place in each category will receive 3 Arcade Tokens."); StoryBuilder.AppendSpeechBubbleSegment(segment, 0, "Second will receive 2 Arcade Tokens."); StoryBuilder.AppendSpeechBubbleSegment(segment, 0, "Third will receive 1 Arcade Token."); foreach (var leaderboard in LeaderBoardManager.ListLeaderboards()) { var leaderboardItems = leaderboard.Load().OrderByDescending(x => x.Value).ToList(); StoryBuilder.AppendSpeechBubbleSegment(segment, 0, $"In the {leaderboard.Name} category..."); if (leaderboardItems.Count > 0) { StoryBuilder.AppendSpeechBubbleSegment(segment, 0, $"First place goes to {leaderboardItems[0].Name}!"); } if (leaderboardItems.Count > 1) { StoryBuilder.AppendSpeechBubbleSegment(segment, 0, $"Second place goes to {leaderboardItems[1].Name}!"); } if (leaderboardItems.Count > 2) { StoryBuilder.AppendSpeechBubbleSegment(segment, 0, $"Third place goes to {leaderboardItems[2].Name}!"); } } StoryBuilder.AppendSpeechBubbleSegment(segment, 0, "That's every category!"); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this.gameObject); } }
private void SendLeaderBoard() { if (game.gameMode == "Classic") { LeaderBoardManager.AddPlayerClassicToLeaderBoard(game.playerName, game.deviceId, int.Parse(game.mMRPlayer), int.Parse(game.timeTest)); } else if (game.gameMode == "Arcade") { LeaderBoardManager.AddPlayerArcadeToLeaderBoard(game.playerName, game.deviceId, int.Parse(game.mMRPlayer), int.Parse(game.timeTest)); } }
void Start() { leaderboard = new LeaderBoardManager(); rankNameTexts = new Text[numberEntries]; rankStatsTexts = new Text[numberEntries]; mapController.Init(numberEntries); for (int i = 0; i < numberEntries; i++) { GameObject g = Instantiate(rankPrefab, new Vector3(0, -i * 90.0F - 90F, 0), Quaternion.identity); // rankPrefab.transform.position, rankPrefab.transform.rotation);// new Vector3(0, -i * 30.0F, 0), Quaternion.identity); g.SetActive(true); //setParent g.transform.SetParent(transform, false); rankNameTexts[i] = g.transform.Find("RankName").GetComponent <Text>(); rankStatsTexts[i] = g.transform.Find("RankStats").GetComponent <Text>(); } // void UpdateRankLocal(string name, float v, ErgData ergData, Segment segment) }
private void Awake() { if (instance != null) { Debug.LogError("More than one ServicesManager exists!"); Application.Quit(); return; } adManager = GetComponentInChildren <AdManager>(); achievementManager = GetComponentInChildren <AchievementManager>(); iapManager = GetComponentInChildren <IAPManager>(); twitterBlade = GetComponentInChildren <TwitterBlade>(); leaderBoardManager = GetComponentInChildren <LeaderBoardManager>(); DontDestroyOnLoad(this.gameObject); }
void Start() { menuCanvas = MainMenu.GetComponent <CanvasGroup>(); InitializeMenu(); if (!hasSeenSplash) { StartCoroutine(StartMainMenuCorout()); } else { MainMenu.SetActive(true); menuCanvas.alpha = 1; } StartCoroutine(LoadScene()); playerControls = new PlayerControls(); playerControls.Enable(); playerControls.MenuNavigation.Movement.started += OnAxesChanged; leaderBoardManager = new LeaderBoardManager(); }
void Awake() { // PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build(); PlayGamesPlatform.InitializeInstance(config); PlayGamesPlatform.Activate(); // recommended for debugging: PlayGamesPlatform.DebugLogEnabled = true; // Activate the Google Play Games platform if (!PlayGamesPlatform.Instance.localUser.authenticated) { PlayGamesPlatform.Instance.Authenticate((bool success) => { if (success) { /// Signed in! Hooray! LogInButton.SetActive(false); } else { /// Not signed in. We'll want to show a sign in button LogInButton.SetActive(true); } }, true); /// <--- That "true" is very important! } else { Debug.Log("We're already signed in"); } if (instance == null) { instance = this; } }
private void SatNameToLeaderBoard() { LeaderBoardManager.SatNamePlayerToLeaderBoard(game.deviceId, game.playerName); }
private void GetLeaderArcadeBoard() { game.arcadeLeaderBoards = LeaderBoardManager.GetArcadeLeaderBoard().ToList(); }
private void GetLeaderClassicBoard() { game.classicLeaderBoards = LeaderBoardManager.GetClassicLeaderBoard().ToList(); }
public static void RunEventIntro() { foreach (var registeredClient in EventManager.GetRegisteredClients()) { var story = BuildEventIntroStory(); StoryManager.PlayStory(registeredClient, story); } if (!Main.IsTestingEvent) { foreach (var leaderboard in LeaderBoardManager.ListLeaderboards()) { var leaderboardItems = leaderboard.Load().OrderByDescending(x => x.Value).ToList(); if (leaderboardItems.Count > 0) { var client = ClientManager.FindClient(leaderboardItems[0].Name); if (client != null) { client.Player.GiveItem(133, 3); } } if (leaderboardItems.Count > 1) { var client = ClientManager.FindClient(leaderboardItems[1].Name); if (client != null) { client.Player.GiveItem(133, 2); } } if (leaderboardItems.Count > 2) { var client = ClientManager.FindClient(leaderboardItems[2].Name); if (client != null) { client.Player.GiveItem(133, 2); } } } using (var databaseConnection = new DatabaseConnection(DatabaseID.Players)) { var topOutlaws = PlayerDataManager.GetTopOutlaws(databaseConnection.Database).OrderByDescending(x => x.Points).Take(3).ToList(); if (topOutlaws.Count > 0) { var client = ClientManager.FindClient(topOutlaws[0].CharacterName); if (client != null) { client.Player.GiveItem(133, 10); } } if (topOutlaws.Count > 1) { var client = ClientManager.FindClient(topOutlaws[1].CharacterName); if (client != null) { client.Player.GiveItem(133, 5); } } if (topOutlaws.Count > 2) { var client = ClientManager.FindClient(topOutlaws[2].CharacterName); if (client != null) { client.Player.GiveItem(133, 3); } } } } }
void InitLeaderBoardSingleton() { this.leaderBoardManager = LeaderBoardManager.Instance; }