示例#1
0
    public void SavePlayData(int score, int coin, int[,] cells, LastBlocks lastBlocks, int[] useItems, int adContinueWatchCount)
    {
        ItemUseCountInfo itemUseCountInfo = ItemUseCountInfo.GetInstance(useItems);

        _userData.SetPlayData(new PlayData(score, coin, cells, lastBlocks, itemUseCountInfo, adContinueWatchCount));
        SaveUserDataFile();
    }
示例#2
0
    public void SaveGameResult(int updateScore, int getCoin, int[] useItems)
    {
        _userData.AddCoin(getCoin);
        if (_userData.UpdateScore(updateScore))
        {
            //Upload Score rank.
            NetworkManager.Instance.SetScoreToLeaderBorad(updateScore);
        }

        ItemUseCountInfo    itemUseCountInfo    = ItemUseCountInfo.GetInstance(useItems);
        AnalyticsEventParam analyticsEventParam = new AnalyticsEventParam()
                                                  .AddParam("Score", updateScore)
                                                  .AddParam("Coin", getCoin)
                                                  .AddParam("Item_Recycle", itemUseCountInfo.GetCount(ItemType.TRASH))
                                                  .AddParam("Item_Hammer", itemUseCountInfo.GetCount(ItemType.BREAK))
                                                  .AddParam("Item_Rewind", itemUseCountInfo.GetCount(ItemType.UNDO));;

        AnalyticsManager.Instance.EventLog(GameConstants.EVENTLOG_BASICMODE_RESULT, analyticsEventParam);

        DeletePlayData();
        SaveUserDataFile();
    }