using System;
using System.Collections.Generic;
using UnityEngine;
namespace Touka
{
public interface ITKGSDK
{
///
/// init sdk
///
void InitSDK(Action _initCallback = null);
///
/// Set game focus
///
///
void SetGameFocusListener(Action _gameFocusAction);
///
/// Set reward click listener
///
void SetRewardClickListener(Action _rewardClickAction);
///
/// Get channel
///
///
AppChannel GetChannel();
#region Ads
// remove all ads
void PurchasedRemoveAds();
///
/// Remove Native Ad
///
void RemoveNativeAd();
///
/// Is Ready Native Ad
///
///
bool IsReadyNativeAd();
///
/// Show Native Ad
///
/// position
void ShowNativeAd(RectTransform pRect, Camera pCam = null, string pAdPos = "");
///
/// Show banner
///
/// 1:top,2:bottom
void ShowBanner(TKGBannerAlign _bannerAlign);
///
/// Hide banner
///
void HideBanner();
///
/// Show Interstitial Ad
///
/// Name of interstitial ad placement.
/// Callback of interstitial ad close and show interstitial failed
/// IVADType for distinguish interstitial ads frequency, default use iv1
void ShowInterstitialAd(TKGIVAdPositionName _adPos, Action _callback = null, IVADType _IvType = IVADType.IV1);
///
/// Show Reward Ad
///
/// Name of reward ad placement
/// true:reward succ, false: reward failed
/// Callback of reward ad show fail
void ShowRewardAd(TKGRVPositionName _adPos, Action _rewardCallback = null, Action _showFailedCallback = null);
///
/// SetShowSDKToast
/// if use sdk toast set true else set false
void SetShowSDKToast(bool _useSDKToast);
///
/// Is Ready Reward
///
///
bool IsReadyRewardAd();
///
/// Is Ready Interstitial
///
///
bool IsReadyInterstitialAd();
#endregion
#region Log Event
#region Normal
///
/// log event
///
///
void LogEvent(string _eventSort);
///
/// log event
///
///
///
///
void LogEvent(string _eventSort, string _key, string _value);
///
/// log event
///
///
///
///
///
///
void LogEvent(string _eventSort, string _key01, string _value01, string _key02, string _value02);
///
/// log event
///
///
///
void LogEvent(string _eventSort, Dictionary _eventDic = null);
#endregion
#region Level Event
///
/// Notify game start
///
///
void LevelStart(int _level);
///
/// Notify game start
///
///
void LevelStart(string _level);
///
/// Notify game end
///
///
///
bool LevelEnd(int _level, StageResult _stageResult);
///
/// Notify game end
///
///
///
bool LevelEnd(string _level, StageResult _stageResult);
#endregion
#region Reward Ad Button Show
///
/// Log Reward ad button show
///
///
void LogRewardAdBtnShow(string _pos);
#endregion
#region Tracking Event
/////
///// Log Tracking Event
/////
/////
//void LogTrackingEvent(TrackingEventType _eventType);
#endregion
#endregion
#region Online Config
///
/// get config - string
///
///
///
string GetConfigStr(string _key);
///
/// get config - int
///
///
///
int GetConfigInt(string _key);
///
/// get config - bool
///
///
///
bool GetConfigBool(string _key);
#endregion
#region Others(common)
///
/// review
///
void Review();
///
/// open privacy url
///
void OpenPrivacyURL();
///
/// open user term url
///
void OpenUserTermURL();
///
/// open more game
///
void OpenMoreGame();
///
/// open browser url
///
///
void OpenUrlByBrowser(string _url);
void OpenPolicyPop();
void Toast(string _text);
///
/// shake
///
/// 0 light,1 medium,2 heavy
/// ios 0~1, android any num
void Shake(int _shakeType, float _intensity = 1);
#endregion
#region Others (unCommon)
///
/// Set game focus
///
///
void SetUserSourceListener(Action _userSourceAction);
///
/// Set game focus
///
///
void SetUserSourceListener(Action _userSourceActionWithCampaignName);
///
/// 注册功能开关回调
///
/// 各功能名称
/// 回调事件,回来每个功能名称及对应开关
void SetFunctionSwitchListener(List _functionKeys, Action _functionSwitchCallback);
///
/// common callback
///
///
void SetTKGCommonCallback(Action _commonCallback);
///
/// set log enable
///
///
void SetLogEnable(bool _enable);
///
/// share txt
///
///
void ShareTxt(string _shareTxt);
///
/// show picture cross
///
bool showPictureCross();
///
/// remove picture cross
///
void removePictureCross();
///
/// show more game icon
///
bool showMoreGameIcon();
///
/// remove more game icon
///
void removeMoreGameIcon();
///
/// regist APNS
///
void RegistAPNS();
///
/// shake
///
/// notification identifier
/// The body of the notification.
/// notify after the time interval. format: yyyy-MM-dd HH:mm:ss
/// The application badge number.
/// The title of the notification.
/// The subtitle of the notification.
void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle);
///
/// remove all notification
///
void RemoveAllNotifications();
///
/// remove notification by notification identifier
///
/// notification identifier
void RemoveNotification(string notiId);
#endregion
}
///
/// 功能名称枚举
///
public enum FunctionType
{
Function_wangz,
Function_bing,
Function_IA,
Function_IP,
Function_name,
Function_other1,
Function_other2,
Function_other3
}
///
/// IV Ad Type
/// Control different frequency interstitial Ads
///
public enum IVADType
{
IV1 = 0,
IV2,
IV3,
IV4,
IV5,
IV6,
IV7,
iv8,
MAX,
}
///
/// Tracking Event Type
///
public enum TrackingEventType
{
GuildStart = 0, // guide start show
GuildEnd = 1, // guild end
FirstOperateGame = 2, // user operates the game for the first time
Max,
}
///
/// ad show failed code type
///
public enum AdShowFailCodeType
{
AdShowFailReal = 57, // ad real show failed
AdIsNotReady = 58, // The ad component is displayed and found not ready
AdIsReadyCannotShow = 59, // When the ad component is displayed, the ad is ready, but the rule that cannot display the ad is triggered
}
///
/// banner align
///
public enum TKGBannerAlign : int
{
BannerCenterBottomAlign = 34,
BannerCenterTopAlign = 10,
}
///
/// tkg common callback code
///
public enum CommonCallbackCode
{
FirebaseOnlineParamGet_Succ = 990001,
FirebaseOnlineParamGet_Failed = 990002,
}
///
/// stage result
///
public enum StageResult
{
StageSucc = 0,
StageFail = 1,
StageRetry = 2,
StageBack = 3,
}
///
/// app channel
///
public enum AppChannel
{
None,
AppStore_GB,
AppStore_CN,
GooglePlay,
DY012,
GW002,
HY003,
OP004,
VO005,
XM006,
HW007,
TX008,
TP009,
MM010,
ZX011,
KS012,
PJ000,
AndroidRoot = 10000
}
}