コード例 #1
0
        public void OnSkillListItemLearnBtnClick(Evt evt)
        {
            var skillId = (int)evt.Data;

            AnalyticsUtils.AddCategorizedEventParam("Id", skillId);
            LogEvent("Skill.Learn");
        }
コード例 #2
0
        private void LogEvent(string name)
        {
            PlayerState playerState = playerStateStorage.Get();

            AnalyticsUtils.AddCategorizedEventParam(
                "Level", playerState == null ? 0 : playerState.Level);
            AnalyticsUtils.LogEvent(name);
        }
コード例 #3
0
        private void AddPlayerLevelCompletionPercentage()
        {
            int level = playerStateStorage.Get().Level;
            int levelCompletionScore =
                levelSettingsStorage.Get(level).CompletionScore;
            int levelCompletionPercentage =
                player.Score * 10 / levelCompletionScore;

            AnalyticsUtils.AddCategorizedEventParam(
                "Player.LevelCompletionPercentage", levelCompletionPercentage);
        }
コード例 #4
0
 private void AddPlayerActionsPerMinuteRank()
 {
     AnalyticsUtils.AddCategorizedEventParam(
         "Player.ActionsPerMinuteRank", player.ActionsPerMinuteRank);
 }