update: 更新经济打点接口参数
							parent
							
								
									42966759b3
								
							
						
					
					
						commit
						bcaed876f7
					
				|  | @ -804,22 +804,24 @@ namespace Guru | |||
| 
 | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// 通过使用 Currency 购买获得 Prop (earn_virtual_currency) (reward:level)  | ||||
|         /// 购买获得 Prop (earn_virtual_currency) (reward:level)  | ||||
|         /// 记录 Prop 增加的打点, 消费游戏内货币 | ||||
|         /// </summary> | ||||
|         /// <param name="currencyName">货币名称</param> | ||||
|         /// <param name="props">获取的道具名称列表</param> | ||||
|         /// <param name="currencyName">购买的道具名称</param> | ||||
|         /// <param name="spendCurrencyName">消费货币名称</param> | ||||
|         /// <param name="scene">应用场景</param> | ||||
|         /// <param name="value">赚取金额</param> | ||||
|         /// <param name="balance">货币总量(累加后)</param> | ||||
|         /// <param name="value">购入数量</param> | ||||
|         /// <param name="balance">道具总量(累加后)</param> | ||||
|         /// <param name="levelName">当前关卡名称</param> | ||||
|         public static void LogEarnPropsByVirtualCurrency(string currencyName, string[] props, | ||||
|             string scene = Consts.ParameterDefaultScene, | ||||
|             int value = 1, int balance = 0, string levelName = "", Dictionary<string, object> extra = null) | ||||
|         /// <param name="extra"></param> | ||||
|         public static void LogEarnVirtualCurrencyByIGC(string currencyName, string spendCurrencyName, int value = 0, int balance = 0,  | ||||
|             string levelName = "", string scene = "", Dictionary<string, object> extra = null) | ||||
|         { | ||||
|             if (extra.Count == 0) throw new ArgumentException("Value cannot be an empty collection.", nameof(extra)); | ||||
|             string category = Consts.CurrencyCategoryIGC; | ||||
|             string itemName = currencyName; | ||||
|             LogEarnVirtualCurrencyAndProps(currencyName, value, balance, category, itemName, levelName, scene, props, extra); | ||||
|             string itemName = spendCurrencyName; | ||||
|             if (string.IsNullOrEmpty(scene)) scene = Consts.ParameterDefaultScene; | ||||
|             LogEarnVirtualCurrencyAndProps(currencyName, value, balance, category, itemName, levelName, scene, null, extra); // TODO 这里的打点不对 | ||||
|         } | ||||
|          | ||||
|         /// <summary> | ||||
|  | @ -1296,11 +1298,11 @@ namespace Guru | |||
|         /// <param name="eventNames"></param> | ||||
|         public static void SetEventPriority(EventPriority priority, string[] eventNames) | ||||
|         { | ||||
|             if (!IsInitialSuccess) | ||||
|             { | ||||
|                 UnityEngine.Debug.LogError($"{Tag} :: LogEvent {priority} :: Please call <GuruSDK.Start()> first, before you call <LogEvent>."); | ||||
|                 return; | ||||
|             } | ||||
|             // if (!IsInitialSuccess) | ||||
|             // { | ||||
|             //     UnityEngine.Debug.LogError($"{Tag} :: LogEvent {priority} :: Please call <GuruSDK.Start()> first, before you call <LogEvent>."); | ||||
|             //     return; | ||||
|             // } | ||||
| 
 | ||||
|             if (Model.event_priorities == null) Model.event_priorities = new Dictionary<string, int>(10); | ||||
| 
 | ||||
|  | @ -1319,11 +1321,11 @@ namespace Guru | |||
| 
 | ||||
|         public static void SetEventPriority(EventPriority priority, string eventName) | ||||
|         { | ||||
|             if (!IsInitialSuccess) | ||||
|             { | ||||
|                 UnityEngine.Debug.LogError($"{Tag} :: LogEvent {priority} :: Please call <GuruSDK.Start()> first, before you call <LogEvent>."); | ||||
|                 return; | ||||
|             } | ||||
|             // if (!IsInitialSuccess) | ||||
|             // { | ||||
|             //     UnityEngine.Debug.LogError($"{Tag} :: LogEvent {priority} :: Please call <GuruSDK.Start()> first, before you call <LogEvent>."); | ||||
|             //     return; | ||||
|             // } | ||||
|              | ||||
|             SetEventPriority(priority, new string[]{eventName}); | ||||
|         } | ||||
|  |  | |||
|  | @ -245,7 +245,7 @@ namespace Guru | |||
| 			 | ||||
| 			// 经济相关 | ||||
| 			public const string ParameterBalance = "balance"; // 用于余额 | ||||
| 			public const string ParameterDefaultScene = "ingame"; // 货币消费默认场景 | ||||
| 			public const string ParameterDefaultScene = "in_game"; // 货币消费默认场景 | ||||
| 			public const string ParameterVirtualCurrencyName = "virtual_currency_name"; // 虚拟货币名称 | ||||
| 
 | ||||
| 			 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue