61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using System; | |||
|  | using System.Collections; | |||
|  | using System.Collections.Generic; | |||
|  | using UnityEngine; | |||
|  | 
 | |||
|  | namespace Touka | |||
|  | { | |||
|  |     /// <summary> | |||
|  |     /// TKG Native SDK callback, Android & IOS use the same callback interface to ensure the uniformity of the interface | |||
|  |     /// </summary> | |||
|  |     public class TKGSDKCallback | |||
|  |     { | |||
|  |         // init callback | |||
|  |         public static Action mInitCallback = null; | |||
|  |         // game pause/resume callback | |||
|  |         public static Action<bool> mGameFocusCallback = null; | |||
|  | 
 | |||
|  |         #region 插屏广告 | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// interad callback | |||
|  |         /// </summary> | |||
|  |         public static Action mInterAdCallback = null; | |||
|  | 
 | |||
|  |         #endregion | |||
|  | 
 | |||
|  | 
 | |||
|  |         #region 激励视频广告 | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// reward callback | |||
|  |         /// </summary> | |||
|  |         public static Action<bool> mRewardCallback = null; | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// reward show failed | |||
|  |         /// </summary> | |||
|  |         public static Action mRewardShowFailedCallback = null; | |||
|  | 
 | |||
|  |         #endregion | |||
|  | 
 | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// set init callback | |||
|  |         /// </summary> | |||
|  |         /// <param name="_initCallback"></param> | |||
|  |         public static void SetInitCallback(Action _initCallback = null) | |||
|  |         { | |||
|  |             mInitCallback = _initCallback; | |||
|  |         } | |||
|  | 
 | |||
|  |         /// <summary> | |||
|  |         /// set game pause/resume callback | |||
|  |         /// </summary> | |||
|  |         /// <param name="_gameFocusAction"></param> | |||
|  |         public static void SetGameFocusCallback(Action<bool> _gameFocusAction) | |||
|  |         { | |||
|  |             mGameFocusCallback = _gameFocusAction; | |||
|  |         } | |||
|  |     } | |||
|  | } |