using System.Collections; using System.Collections.Generic; using GameLogic.Bag; using UnityEngine; using Utility; public class DBManager : Singleton { public DBManager() { } /// /// 自定义打点 /// /// /// public void CustomEvent(string key, Dictionary properties) { } /// /// 更新用户属性 /// /// public void UpdateUserProperty(Dictionary properties) { } /// /// 记录道具获取 /// /// 来源 /// 道具 public void RecordGetItems(string source, List items) { Dictionary properties = new Dictionary(); foreach (ItemInfo itemInfo in items) { int id = itemInfo.config.ID; long count = itemInfo.count.Value; properties.Add(id.ToString(), count); } properties.Add("#source", source); CustomEvent("#get_items", properties); } /// /// 记录道具消耗 /// /// /// public void RecordCostItems(string source, List items) { Dictionary properties = new Dictionary(); properties.Add("#source", source); foreach (ItemInfo itemInfo in items) { int id = itemInfo.config.ID; long count = itemInfo.count.Value; properties.Add(id.ToString(), count); } CustomEvent("#cost_items", properties); } }