예제 #1
0
    public void SendEndGameAnalytics()
    {
        int remainingPlayAmount = winConditions.CachedRemainingPlayAmount < 0 ? 0 : winConditions.CachedRemainingPlayAmount;

        if (levelWon)
        {
            AnalyticsBinding.LogEventGameAction(characterUsed, "success", remainingPlayAmount.ToString(), GetLevelType(), Match3BoardRenderer.levelIdx);
            AnalyticsBinding.LogEventGameAction(characterUsed, "star_rating", (winConditions as WinScore).StarsReached.ToString(), GetLevelType(), Match3BoardRenderer.levelIdx);

            SetLevelStartAnalyticTimeEvent(true);
        }
        else
        {
            AnalyticsBinding.LogEventGameAction(characterUsed, "fail",
                                                Mathf.FloorToInt((winConditions as WinScore).CalculateObjectiveProgress() * 100f).ToString(),
                                                GetLevelType(), Match3BoardRenderer.levelIdx);
        }
    }
예제 #2
0
    public void StartGame()
    {
        Debug.Log("[Match3BoardGameLogic] StartGame called...");

        AnalyticsBinding.LogEventGameAction(characterUsed, "game_start", null, GetLevelType(), Match3BoardRenderer.levelIdx);
        SetLevelStartAnalyticTimeEvent();

        IsGameOver = false;

        // Resume the main board game logic.
        SetBoardEnabledState(true);

        if (OnStartGame != null)
        {
            OnStartGame();
        }

        TryCheckStableBoard();
    }