更新SDK2.2.6,激励视频添加loading和无广告提示
This commit is contained in:
parent
b1c67d5691
commit
295c37ae66
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2f7b142c5985b40449d22fa1859a2a00
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,93 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 0}
|
||||||
|
m_Name: Settings
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp:GameAnalyticsSDK.Setup:Settings
|
||||||
|
TotalMessagesSubmitted: 0
|
||||||
|
TotalMessagesFailed: 0
|
||||||
|
DesignMessagesSubmitted: 0
|
||||||
|
DesignMessagesFailed: 0
|
||||||
|
QualityMessagesSubmitted: 0
|
||||||
|
QualityMessagesFailed: 0
|
||||||
|
ErrorMessagesSubmitted: 0
|
||||||
|
ErrorMessagesFailed: 0
|
||||||
|
BusinessMessagesSubmitted: 0
|
||||||
|
BusinessMessagesFailed: 0
|
||||||
|
UserMessagesSubmitted: 0
|
||||||
|
UserMessagesFailed: 0
|
||||||
|
CustomArea:
|
||||||
|
gameKey: []
|
||||||
|
secretKey: []
|
||||||
|
Build: []
|
||||||
|
SelectedPlatformOrganization: []
|
||||||
|
SelectedPlatformStudio: []
|
||||||
|
SelectedPlatformGame: []
|
||||||
|
SelectedPlatformGameID:
|
||||||
|
SelectedOrganization:
|
||||||
|
SelectedStudio:
|
||||||
|
SelectedGame:
|
||||||
|
NewVersion:
|
||||||
|
Changes:
|
||||||
|
SignUpOpen: 1
|
||||||
|
StudioName:
|
||||||
|
GameName:
|
||||||
|
OrganizationName:
|
||||||
|
OrganizationIdentifier:
|
||||||
|
EmailGA:
|
||||||
|
IntroScreen: 1
|
||||||
|
InfoLogEditor: 1
|
||||||
|
InfoLogBuild: 1
|
||||||
|
VerboseLogBuild: 0
|
||||||
|
UseManualSessionHandling: 0
|
||||||
|
SendExampleGameDataToMyGame: 0
|
||||||
|
UseIMEI: 0
|
||||||
|
InternetConnectivity: 0
|
||||||
|
CustomDimensions01: []
|
||||||
|
CustomDimensions02: []
|
||||||
|
CustomDimensions03: []
|
||||||
|
ResourceItemTypes: []
|
||||||
|
ResourceCurrencies: []
|
||||||
|
LastCreatedGamePlatform: 0
|
||||||
|
Platforms:
|
||||||
|
CurrentInspectorState: 0
|
||||||
|
ClosedHints:
|
||||||
|
DisplayHints: 0
|
||||||
|
DisplayHintsScrollState: {x: 0, y: 0}
|
||||||
|
Logo: {fileID: 0}
|
||||||
|
UpdateIcon: {fileID: 0}
|
||||||
|
InfoIcon: {fileID: 0}
|
||||||
|
DeleteIcon: {fileID: 0}
|
||||||
|
GameIcon: {fileID: 0}
|
||||||
|
HomeIcon: {fileID: 0}
|
||||||
|
InstrumentIcon: {fileID: 0}
|
||||||
|
QuestionIcon: {fileID: 0}
|
||||||
|
UserIcon: {fileID: 0}
|
||||||
|
AmazonIcon: {fileID: 0}
|
||||||
|
GooglePlayIcon: {fileID: 0}
|
||||||
|
iosIcon: {fileID: 0}
|
||||||
|
macIcon: {fileID: 0}
|
||||||
|
windowsPhoneIcon: {fileID: 0}
|
||||||
|
UsePlayerSettingsBuildNumber: 0
|
||||||
|
SubmitErrors: 1
|
||||||
|
NativeErrorReporting: 0
|
||||||
|
MaxErrorCount: 10
|
||||||
|
SubmitFpsAverage: 1
|
||||||
|
SubmitFpsCritical: 1
|
||||||
|
IncludeGooglePlay: 1
|
||||||
|
FpsCriticalThreshold: 20
|
||||||
|
FpsCirticalSubmitInterval: 1
|
||||||
|
PlatformFoldOut:
|
||||||
|
CustomDimensions01FoldOut: 0
|
||||||
|
CustomDimensions02FoldOut: 0
|
||||||
|
CustomDimensions03FoldOut: 0
|
||||||
|
ResourceItemTypesFoldOut: 0
|
||||||
|
ResourceCurrenciesFoldOut: 0
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 10b7e284f13ce41268736687ce969d1c
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -71,7 +71,12 @@ public static class AdsUtils
|
||||||
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
|
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
|
||||||
{
|
{
|
||||||
pSuccessCallback?.Invoke();
|
pSuccessCallback?.Invoke();
|
||||||
}, UIUtils.ShowNoAdsTip);
|
}, noUnityTips, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void noUnityTips()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -166,7 +166,7 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
||||||
/// <param name="_adPos"> Name of reward ad placement</param>
|
/// <param name="_adPos"> Name of reward ad placement</param>
|
||||||
/// <param name="_rewardCallback"> true:reward succ, false: reward failed</param>
|
/// <param name="_rewardCallback"> true:reward succ, false: reward failed</param>
|
||||||
/// <param name="_showFailedCallback">Callback of reward ad show fail</param>
|
/// <param name="_showFailedCallback">Callback of reward ad show fail</param>
|
||||||
public void ShowRewardAd(TKGRVPositionName _adPos, Action<bool> _rewardCallback = null, Action _showFailedCallback = null)
|
public void ShowRewardAd(TKGRVPositionName _adPos, Action<bool> _rewardCallback = null, Action _showFailedCallback = null, bool showSDKToast = false)
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR || NO_AD
|
#if UNITY_EDITOR || NO_AD
|
||||||
if (null != _rewardCallback)
|
if (null != _rewardCallback)
|
||||||
|
@ -182,6 +182,7 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_sdkInterface.SetShowSDKToast(showSDKToast);
|
||||||
m_sdkInterface.ShowRewardAd(_adPos, _rewardCallback, _showFailedCallback);
|
m_sdkInterface.ShowRewardAd(_adPos, _rewardCallback, _showFailedCallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +203,7 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool IsReadyInterstitialAd()
|
public bool IsReadyInterstitialAd()
|
||||||
{
|
{
|
||||||
|
|
||||||
return m_sdkInterface.IsReadyInterstitialAd();
|
return m_sdkInterface.IsReadyInterstitialAd();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -517,20 +518,88 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
||||||
{
|
{
|
||||||
m_sdkInterface.Shake(_shakeType, _intensity);
|
m_sdkInterface.Shake(_shakeType, _intensity);
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region others
|
/// <summary>
|
||||||
|
/// share txt
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_shareTxt"></param>
|
||||||
|
public void Share(string shareText)
|
||||||
|
{
|
||||||
|
m_sdkInterface.ShareTxt(shareText);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// regist APNS
|
||||||
|
/// </summary>
|
||||||
|
public void RegistAPNS()
|
||||||
|
{
|
||||||
|
|
||||||
|
m_sdkInterface.RegistAPNS();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// shake
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiName">notification identifier</param>
|
||||||
|
/// <param name="body">The body of the notification.</param>
|
||||||
|
/// <param name="fireDate">notify after the time interval. format:yyyy-MM-dd HH:mm:ss </param>
|
||||||
|
/// <param name="badge">The application badge number.</param>
|
||||||
|
/// <param name="title">The title of the notification.</param>
|
||||||
|
/// <param name="subTitle">The subtitle of the notification.</param>
|
||||||
|
public void RegistNotification(string notiId, string body, string fireDate, int badge = 1, string title = "", string subTitle = "")
|
||||||
|
{
|
||||||
|
|
||||||
|
m_sdkInterface.RegistNotification(notiId,body,fireDate,badge,title,subTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove all notification
|
||||||
|
/// </summary>
|
||||||
|
public void RemoveAllNotifications()
|
||||||
|
{
|
||||||
|
|
||||||
|
m_sdkInterface.RemoveAllNotifications();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove notification by notification identifier
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiId">notification identifier</param>
|
||||||
|
public void RemoveNotification(string notiId)
|
||||||
|
{
|
||||||
|
|
||||||
|
m_sdkInterface.RemoveNotification(notiId);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region others
|
||||||
|
|
||||||
|
public void Toast(string text)
|
||||||
|
{
|
||||||
|
m_sdkInterface.Toast(text);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set user source listener
|
/// Set user source listener
|
||||||
/// only call first can back source
|
/// only call first can back source
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="_userSourceAction"> true : origin user,false : not origin user </param>
|
/// <param name="_userSourceAction"> true : origin user,false : not origin user </param>2
|
||||||
public void SetUserSourceListener(Action<bool, string> _userSourceAction)
|
public void SetUserSourceListener(Action<bool, string> _userSourceAction)
|
||||||
{
|
{
|
||||||
m_sdkInterface.SetUserSourceListener(_userSourceAction);
|
m_sdkInterface.SetUserSourceListener(_userSourceAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set user source listener
|
||||||
|
/// only call first can back source
|
||||||
|
/// with campaginName
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_userSourceAction"> true : origin user,false : not origin user </param>2
|
||||||
|
public void SetUserSourceListener(Action<bool, string, string> _userSourceAction)
|
||||||
|
{
|
||||||
|
m_sdkInterface.SetUserSourceListener(_userSourceAction);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// set common callback
|
/// set common callback
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -76,6 +76,12 @@ namespace Touka
|
||||||
/// <param name="_showFailedCallback">Callback of reward ad show fail</param>
|
/// <param name="_showFailedCallback">Callback of reward ad show fail</param>
|
||||||
void ShowRewardAd(TKGRVPositionName _adPos, Action<bool> _rewardCallback = null, Action _showFailedCallback = null);
|
void ShowRewardAd(TKGRVPositionName _adPos, Action<bool> _rewardCallback = null, Action _showFailedCallback = null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SetShowSDKToast
|
||||||
|
/// <param name="useSDKToast"> if use sdk toast set true else set false</param>
|
||||||
|
|
||||||
|
void SetShowSDKToast(bool _useSDKToast);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is Ready Reward
|
/// Is Ready Reward
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -234,6 +240,8 @@ namespace Touka
|
||||||
|
|
||||||
void OpenPolicyPop();
|
void OpenPolicyPop();
|
||||||
|
|
||||||
|
void Toast(string _text);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// shake
|
/// shake
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -251,6 +259,12 @@ namespace Touka
|
||||||
/// <param name="_gameFocusAction"></param>
|
/// <param name="_gameFocusAction"></param>
|
||||||
void SetUserSourceListener(Action<bool, string> _userSourceAction);
|
void SetUserSourceListener(Action<bool, string> _userSourceAction);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set game focus
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_gameFocusAction"></param>
|
||||||
|
void SetUserSourceListener(Action<bool, string, string> _userSourceActionWithCampaignName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// common callback
|
/// common callback
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -263,6 +277,41 @@ namespace Touka
|
||||||
/// <param name="_enable"></param>
|
/// <param name="_enable"></param>
|
||||||
void SetLogEnable(bool _enable);
|
void SetLogEnable(bool _enable);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// share txt
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_shareTxt"></param>
|
||||||
|
void ShareTxt(string _shareTxt);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// regist APNS
|
||||||
|
/// </summary>
|
||||||
|
void RegistAPNS();
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// shake
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiId">notification identifier</param>
|
||||||
|
/// <param name="body">The body of the notification.</param>
|
||||||
|
/// <param name="fireDate">notify after the time interval. format: yyyy-MM-dd HH:mm:ss </param>
|
||||||
|
/// <param name="badge">The application badge number.</param>
|
||||||
|
/// <param name="title">The title of the notification.</param>
|
||||||
|
/// <param name="subTitle">The subtitle of the notification.</param>
|
||||||
|
void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove all notification
|
||||||
|
/// </summary>
|
||||||
|
void RemoveAllNotifications();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove notification by notification identifier
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiId">notification identifier</param>
|
||||||
|
void RemoveNotification(string notiId);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,17 @@ namespace Touka
|
||||||
TKGNativeInterface.Instance.showRewardAd(_adPos.ToString(), -1);
|
TKGNativeInterface.Instance.showRewardAd(_adPos.ToString(), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Toast(string text) {
|
||||||
|
|
||||||
|
TKGNativeInterface.Instance.toast(text);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetShowSDKToast(bool _useSDKToast)
|
||||||
|
{
|
||||||
|
TKGNativeInterface.Instance.SetShowSDKToast(_useSDKToast);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is Ready Interstitial
|
/// Is Ready Interstitial
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -564,6 +575,19 @@ namespace Touka
|
||||||
TKGNativeInterface.Instance.SetUserSourceCallback(new AndroidTKGUserSourceCalllback());
|
TKGNativeInterface.Instance.SetUserSourceCallback(new AndroidTKGUserSourceCalllback());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SetUserSourceListenerWithCampaignName
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_userSourceAction"></param>
|
||||||
|
public void SetUserSourceListener(Action<bool, string, string> _userSourceAction)
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName = _userSourceAction;
|
||||||
|
TKGNativeInterface.Instance.SetUserSourceCallback(new AndroidTKGUserSourceCalllbackWithCampaignName());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set TKG Common callback
|
/// Set TKG Common callback
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -585,15 +609,77 @@ namespace Touka
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if UNITY_IOS
|
|
||||||
TKGNativeInterface.Instance.SetLogEnable(_enable);
|
TKGNativeInterface.Instance.SetLogEnable(_enable);
|
||||||
#else
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// share txt
|
||||||
|
/// </summary>
|
||||||
|
public void ShareTxt(string _shareTxt)
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
TKGNativeInterface.Instance.ShareTxt(_shareTxt);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// regist APNS
|
||||||
|
/// </summary>
|
||||||
|
public void RegistAPNS()
|
||||||
|
{
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
TKGNativeInterface.Instance.RegistAPNS();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// shake
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiId">notification identifier</param>
|
||||||
|
/// <param name="body">The body of the notification.</param>
|
||||||
|
/// <param name="fireDate">notify after the time interval. format: yyyy-MM-dd HH:mm:ss </param>
|
||||||
|
/// <param name="badge">The application badge number.</param>
|
||||||
|
/// <param name="title">The title of the notification.</param>
|
||||||
|
/// <param name="subTitle">The subtitle of the notification.</param>
|
||||||
|
public void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle) {
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
TKGNativeInterface.Instance.RegistNotification(notiId,body,fireDate,badge,title,subTitle);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove all notification
|
||||||
|
/// </summary>
|
||||||
|
public void RemoveAllNotifications() {
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
TKGNativeInterface.Instance.RemoveAllNotifications();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
/// <summary>
|
||||||
|
/// remove notification by notification identifier
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiId">notification identifier</param>
|
||||||
|
public void RemoveNotification(string notiId) {
|
||||||
|
|
||||||
|
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
TKGNativeInterface.Instance.RemoveNotification(notiId);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,12 +74,37 @@ public class TGiOSAdManager : MonoBehaviour
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 通知
|
||||||
|
public void registAPNS()
|
||||||
|
{
|
||||||
|
TKG_RegistAPNS();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle)
|
||||||
|
{
|
||||||
|
TKG_RegistNotification(notiId,body,fireDate,badge,title,subTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeNotification(string notiId)
|
||||||
|
{
|
||||||
|
TKG_RemoveNotification(notiId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeAllNotifications()
|
||||||
|
{
|
||||||
|
TKG_RemoveAllNotification();
|
||||||
|
}
|
||||||
// 震动
|
// 震动
|
||||||
public void shake(int mType, float mIntensity = 1)
|
public void shake(int mType, float mIntensity = 1)
|
||||||
{
|
{
|
||||||
TKG_Shake(mType,mIntensity);
|
TKG_Shake(mType,mIntensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void share(string _shareText)
|
||||||
|
{
|
||||||
|
TKG_Share(_shareText);
|
||||||
|
}
|
||||||
|
|
||||||
// ads
|
// ads
|
||||||
|
|
||||||
public void RemoveAllAds()
|
public void RemoveAllAds()
|
||||||
|
@ -141,6 +166,11 @@ public class TGiOSAdManager : MonoBehaviour
|
||||||
TKG_ShowRewardVideo(adPos);
|
TKG_ShowRewardVideo(adPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ShowSDKToast(bool _show)
|
||||||
|
{
|
||||||
|
TKG_ShowSDKToast(_show);
|
||||||
|
}
|
||||||
|
|
||||||
// native
|
// native
|
||||||
public void LoadNative(float width, float height)
|
public void LoadNative(float width, float height)
|
||||||
{
|
{
|
||||||
|
@ -187,6 +217,10 @@ public class TGiOSAdManager : MonoBehaviour
|
||||||
TKG_OpenMoreGame();
|
TKG_OpenMoreGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Toast(string content)
|
||||||
|
{
|
||||||
|
TKG_Toast(content);
|
||||||
|
}
|
||||||
|
|
||||||
// 在线参数
|
// 在线参数
|
||||||
public int GetConfigInt(string key, int defaultValue)
|
public int GetConfigInt(string key, int defaultValue)
|
||||||
|
@ -357,21 +391,30 @@ public class TGiOSAdManager : MonoBehaviour
|
||||||
|
|
||||||
// user source
|
// user source
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
public delegate void TKG_UsersourceDelegate(bool isOrganic,string source);
|
public delegate void TKG_UsersourceDelegate(bool isOrganic,string source,string campaignName);
|
||||||
[AOT.MonoPInvokeCallback(typeof(TKG_UsersourceDelegate))]
|
[AOT.MonoPInvokeCallback(typeof(TKG_UsersourceDelegate))]
|
||||||
static void userSourceHandle(bool isOrganic, string source)
|
static void userSourceHandle(bool isOrganic, string source,string campaignName)
|
||||||
{
|
{
|
||||||
if (TKGSDKCallback.mTKGUserSourceCallback != null)
|
if (TKGSDKCallback.mTKGUserSourceCallback != null)
|
||||||
{
|
{
|
||||||
TKGSDKCallback.mTKGUserSourceCallback(isOrganic,source);
|
TKGSDKCallback.mTKGUserSourceCallback(isOrganic,source);
|
||||||
TKGSDKCallback.mTKGUserSourceCallback = null;
|
TKGSDKCallback.mTKGUserSourceCallback = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName != null)
|
||||||
|
{
|
||||||
|
TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName(isOrganic,source, campaignName);
|
||||||
|
TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dll
|
// dll
|
||||||
[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
private static extern void TKG_Shake(int mType, float mIntensity);
|
private static extern void TKG_Shake(int mType, float mIntensity);
|
||||||
|
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void TKG_Share(string text);
|
||||||
|
|
||||||
[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
private static extern void TKG_InitSDK();
|
private static extern void TKG_InitSDK();
|
||||||
|
|
||||||
|
@ -414,6 +457,9 @@ public class TGiOSAdManager : MonoBehaviour
|
||||||
[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
private static extern void TKG_OpenMoreGame();
|
private static extern void TKG_OpenMoreGame();
|
||||||
|
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void TKG_Toast(string str);
|
||||||
|
|
||||||
// ads
|
// ads
|
||||||
[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
private static extern void TKG_LoadBanner();
|
private static extern void TKG_LoadBanner();
|
||||||
|
@ -445,6 +491,9 @@ public class TGiOSAdManager : MonoBehaviour
|
||||||
[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
private static extern void TKG_ShowRewardVideo(string adPos);
|
private static extern void TKG_ShowRewardVideo(string adPos);
|
||||||
|
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void TKG_ShowSDKToast(bool _show);
|
||||||
|
|
||||||
[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
private static extern void TKG_LoadNative(float width, float height);
|
private static extern void TKG_LoadNative(float width, float height);
|
||||||
|
|
||||||
|
@ -518,7 +567,20 @@ public class TGiOSAdManager : MonoBehaviour
|
||||||
|
|
||||||
// 设置unity版本
|
// 设置unity版本
|
||||||
[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
private static extern bool TKG_SetUnityVersion(string version);
|
private static extern void TKG_SetUnityVersion(string version);
|
||||||
|
|
||||||
|
// 通知
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void TKG_RegistAPNS();
|
||||||
|
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void TKG_RemoveAllNotification();
|
||||||
|
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void TKG_RemoveNotification(string notiId);
|
||||||
|
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void TKG_RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle);
|
||||||
|
|
||||||
// ============================ old sdk todo ========================
|
// ============================ old sdk todo ========================
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,4 @@ public enum TKGRVPositionName
|
||||||
Get_Monster,
|
Get_Monster,
|
||||||
Get_Coin,
|
Get_Coin,
|
||||||
Get_AutoMerge,
|
Get_AutoMerge,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@ public static class TKGParams
|
||||||
{ TKGParamKey.RemoveAdsShowCount.ToString(), 4 }, // int value //
|
{ TKGParamKey.RemoveAdsShowCount.ToString(), 4 }, // int value //
|
||||||
{ TKGParamKey.LevelList.ToString(), "1,78,72,70,64,65,4,66" }, // string value
|
{ TKGParamKey.LevelList.ToString(), "1,78,72,70,64,65,4,66" }, // string value
|
||||||
{ TKGParamKey.HasBlock.ToString(), 0 }, // bool value // 1:true 0:false
|
{ TKGParamKey.HasBlock.ToString(), 0 }, // bool value // 1:true 0:false
|
||||||
{ TKGParamKey.UserGroup.ToString(), "Default" },
|
{ TKGParamKey.UserGroup.ToString(), "Default" },
|
||||||
{ TKGParamKey.RemoveAdsShow.ToString(), 2 },
|
{ TKGParamKey.RemoveAdsShow.ToString(), 2 },
|
||||||
{ TKGParamKey.RemoveAds.ToString(), 4 },
|
{ TKGParamKey.RemoveAds.ToString(), 4 },
|
||||||
{ TKGParamKey.LevelInterSwitch.ToString(), 3 },
|
{ TKGParamKey.LevelInterSwitch.ToString(), 3 },
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace Touka
|
||||||
public void OnButton_ShowRewardAd()
|
public void OnButton_ShowRewardAd()
|
||||||
{
|
{
|
||||||
Debug.Log("[ToukaSDKDemo] OnButton_ShowRewardAd click");
|
Debug.Log("[ToukaSDKDemo] OnButton_ShowRewardAd click");
|
||||||
TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_GetDoubleCoin, RewardResult, RvShowFailed);
|
TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_GetDoubleCoin, RewardResult, RvShowFailed,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -102,6 +102,7 @@ namespace Touka
|
||||||
|
|
||||||
public void OnButton_IsReadyIV()
|
public void OnButton_IsReadyIV()
|
||||||
{
|
{
|
||||||
|
|
||||||
Debug.Log("[ToukaSDKDemo] OnButton_IsReadyIV click");
|
Debug.Log("[ToukaSDKDemo] OnButton_IsReadyIV click");
|
||||||
bool isReadyIV = TKGSDKManager.Instance.IsReadyInterstitialAd();
|
bool isReadyIV = TKGSDKManager.Instance.IsReadyInterstitialAd();
|
||||||
Debug.Log("[ToukaSDKDemo] isReadyIV : " + isReadyIV);
|
Debug.Log("[ToukaSDKDemo] isReadyIV : " + isReadyIV);
|
||||||
|
@ -217,7 +218,7 @@ namespace Touka
|
||||||
public void OnButton_OpenMoreGame()
|
public void OnButton_OpenMoreGame()
|
||||||
{
|
{
|
||||||
Debug.Log("[ToukaSDKDemo] OnButton_OpenMoreGame click");
|
Debug.Log("[ToukaSDKDemo] OnButton_OpenMoreGame click");
|
||||||
TKGSDKManager.Instance.OpenMoreGame();
|
//TKGSDKManager.Instance.OpenMoreGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnButton_ReviewBtn()
|
public void OnButton_ReviewBtn()
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
|
@ -0,0 +1,92 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3221324322af4485da8817ea637bff7d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -56,7 +56,7 @@ namespace Touka
|
||||||
PlistElementDict atf = plist.root["NSAppTransportSecurity"].AsDict();
|
PlistElementDict atf = plist.root["NSAppTransportSecurity"].AsDict();
|
||||||
atf.SetBoolean("NSAllowsArbitraryLoads", true);
|
atf.SetBoolean("NSAllowsArbitraryLoads", true);
|
||||||
|
|
||||||
#region iOS 14
|
#region iOS 14
|
||||||
//SKAdnetwork追加
|
//SKAdnetwork追加
|
||||||
PlistElementArray URLWhiteListArr2 = plist.root.CreateArray("SKAdNetworkItems");
|
PlistElementArray URLWhiteListArr2 = plist.root.CreateArray("SKAdNetworkItems");
|
||||||
|
|
||||||
|
@ -584,6 +584,59 @@ namespace Touka
|
||||||
PlistElementDict dic126;
|
PlistElementDict dic126;
|
||||||
dic126 = URLWhiteListArr2.AddDict();
|
dic126 = URLWhiteListArr2.AddDict();
|
||||||
dic126.SetString("SKAdNetworkIdentifier", "pwdxu55a5a.skadnetwork");
|
dic126.SetString("SKAdNetworkIdentifier", "pwdxu55a5a.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic127;
|
||||||
|
dic127 = URLWhiteListArr2.AddDict();
|
||||||
|
dic127.SetString("SKAdNetworkIdentifier", "b9bk5wbcq9.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic128;
|
||||||
|
dic128 = URLWhiteListArr2.AddDict();
|
||||||
|
dic128.SetString("SKAdNetworkIdentifier", "x5l83yy675.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic129;
|
||||||
|
dic129 = URLWhiteListArr2.AddDict();
|
||||||
|
dic129.SetString("SKAdNetworkIdentifier", "x2jnk7ly8j.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic130;
|
||||||
|
dic130 = URLWhiteListArr2.AddDict();
|
||||||
|
dic130.SetString("SKAdNetworkIdentifier", "4w7y6s5ca2.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic131;
|
||||||
|
dic131 = URLWhiteListArr2.AddDict();
|
||||||
|
dic131.SetString("SKAdNetworkIdentifier", "7fmhfwg9en.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic132;
|
||||||
|
dic132 = URLWhiteListArr2.AddDict();
|
||||||
|
dic132.SetString("SKAdNetworkIdentifier", "qu637u8glc.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic133;
|
||||||
|
dic133 = URLWhiteListArr2.AddDict();
|
||||||
|
dic133.SetString("SKAdNetworkIdentifier", "krvm3zuq6h.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic134;
|
||||||
|
dic134 = URLWhiteListArr2.AddDict();
|
||||||
|
dic134.SetString("SKAdNetworkIdentifier", "3l6bd9hu43.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic135;
|
||||||
|
dic135 = URLWhiteListArr2.AddDict();
|
||||||
|
dic135.SetString("SKAdNetworkIdentifier", "a8cz6cu7e5.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic136;
|
||||||
|
dic136 = URLWhiteListArr2.AddDict();
|
||||||
|
dic136.SetString("SKAdNetworkIdentifier", "dkc879ngq3.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic137;
|
||||||
|
dic137 = URLWhiteListArr2.AddDict();
|
||||||
|
dic137.SetString("SKAdNetworkIdentifier", "m5mvw97r93.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic138;
|
||||||
|
dic138 = URLWhiteListArr2.AddDict();
|
||||||
|
dic138.SetString("SKAdNetworkIdentifier", "vcra2ehyfk.skadnetwork");
|
||||||
|
|
||||||
|
PlistElementDict dic139;
|
||||||
|
dic139 = URLWhiteListArr2.AddDict();
|
||||||
|
dic139.SetString("SKAdNetworkIdentifier", "x5l83yy675.skadnetwork");
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
PlistElementArray urlTypes = plist.root.CreateArray("CFBundleURLTypes");
|
PlistElementArray urlTypes = plist.root.CreateArray("CFBundleURLTypes");
|
||||||
|
@ -619,40 +672,19 @@ namespace Touka
|
||||||
private static void ModifyCode(string _path)
|
private static void ModifyCode(string _path)
|
||||||
{
|
{
|
||||||
#if !AppStore_GB
|
#if !AppStore_GB
|
||||||
ToukaClassHelper SplashScreenController = new ToukaClassHelper(_path + "/Classes/UI/SplashScreen.mm");
|
ToukaClassHelper SplashScreenController = new ToukaClassHelper(_path + "/Classes/UI/SplashScreen.mm");
|
||||||
|
|
||||||
if (!SplashScreenController.HasBolow("#import <TKGUNITYSDK/TONativeSplashHelper.h>"))
|
if (!SplashScreenController.HasBolow("#import <TKGUNITYSDK/TONativeSplashHelper.h>"))
|
||||||
{
|
|
||||||
|
|
||||||
SplashScreenController.WriteBelow("#include \"SplashScreen.h\"", "#import <TKGUNITYSDK/TONativeSplashHelper.h>");
|
|
||||||
SplashScreenController.WriteBelow("void HideSplashScreen()\n{", "[[TONativeSplashHelper helper]showSplashInLaunch];");
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USE_SPLASH
|
|
||||||
|
|
||||||
ToukaClassHelper SplashScreenControllers = new ToukaClassHelper(_path + "/Classes/UI/SplashScreen.mm");
|
|
||||||
|
|
||||||
if (!SplashScreenControllers.HasBolow("#import <TKGSplashSDK/TKGSplashManager.h>"))
|
|
||||||
{
|
|
||||||
|
|
||||||
SplashScreenControllers.WriteBelow("#include \"SplashScreen.h\"", "#import <TKGSplashSDK/TKGSplashManager.h>");
|
|
||||||
SplashScreenControllers.WriteBelow("void HideSplashScreen()\n{", "[[TKGSplashManager manager]showSplashInLaunch];");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ToukaClassHelper UnityAppController = new ToukaClassHelper(_path + "/Classes/UnityAppController.mm");
|
|
||||||
if (!UnityAppController.HasBolow("[[TKGSplashManager manager] showSplashInEnterForground];"))
|
|
||||||
{
|
{
|
||||||
UnityAppController.WriteBelow("#import \"UnityAppController.h\"", "\n#import <TKGSplashSDK/TKGSplashManager.h>");
|
|
||||||
UnityAppController.WriteBelow("UnityPause(0);", "\n[[TKGSplashManager manager] showSplashInEnterForground];");
|
SplashScreenController.WriteBelow("#include \"SplashScreen.h\"", "#import <TKGUNITYSDK/TONativeSplashHelper.h>");
|
||||||
|
SplashScreenController.WriteBelow("void HideSplashScreen()\n{", "[[TONativeSplashHelper helper]showSplashInLaunch];");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,9 @@ public class ToukaAnalyticsBuildPostProcessor
|
||||||
|
|
||||||
proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");
|
proj.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");
|
||||||
proj.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
|
proj.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
|
||||||
proj.SetBuildProperty(target, "GCC_C_LANGUAGE_STANDARD", "gnu11");
|
proj.SetBuildProperty(target, "GCC_C_LANGUAGE_STANDARD", "gnu99");
|
||||||
|
proj.SetBuildProperty(target, "GCC_ENABLE_OBJC_EXCEPTIONS","YES");
|
||||||
|
proj.SetBuildProperty(target, "EXCLUDED_ARCHS", "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))");
|
||||||
|
|
||||||
|
|
||||||
File.WriteAllText(projPath, proj.WriteToString());
|
File.WriteAllText(projPath, proj.WriteToString());
|
||||||
|
@ -174,11 +176,14 @@ public class ToukaAnalyticsBuildPostProcessor
|
||||||
plist.ReadFromFile(plistPath);
|
plist.ReadFromFile(plistPath);
|
||||||
#if !AppStore_GB
|
#if !AppStore_GB
|
||||||
plist.root.SetString("NSLocationAlwaysUsageDescription", "为了更好的体验游戏");
|
plist.root.SetString("NSLocationAlwaysUsageDescription", "为了更好的体验游戏");
|
||||||
|
plist.root.SetString("NSCameraUsageDescription", "为了更好的体验游戏");
|
||||||
plist.root.SetString("NSLocationWhenInUseUsageDescription", "为了更好的体验游戏");
|
plist.root.SetString("NSLocationWhenInUseUsageDescription", "为了更好的体验游戏");
|
||||||
plist.root.SetString("NSUserTrackingUsageDescription", "该标识符将用于向您投放个性化广告");
|
plist.root.SetString("NSUserTrackingUsageDescription", "该标识符将用于向您投放个性化广告");
|
||||||
plist.root.SetString("NSPhotoLibraryUsageDescription", "为了更好的体验游戏,请允许APP保存图片到您的相册");
|
plist.root.SetString("NSPhotoLibraryUsageDescription", "为了更好的体验游戏,请允许APP保存图片到您的相册");
|
||||||
|
|
||||||
#else
|
#else
|
||||||
plist.root.SetString ("NSLocationAlwaysUsageDescription", "for better experience the game");
|
plist.root.SetString ("NSLocationAlwaysUsageDescription", "for better experience the game");
|
||||||
|
plist.root.SetString("NSCameraUsageDescription", "for better experience the game");
|
||||||
plist.root.SetString ("NSLocationWhenInUseUsageDescription", "for better experience the game");
|
plist.root.SetString ("NSLocationWhenInUseUsageDescription", "for better experience the game");
|
||||||
plist.root.SetString("NSUserTrackingUsageDescription", "This identifier will be used to deliver personalized ads to you.");
|
plist.root.SetString("NSUserTrackingUsageDescription", "This identifier will be used to deliver personalized ads to you.");
|
||||||
plist.root.SetString("NSPhotoLibraryUsageDescription", "In order to experience the game better, please allow the APP to save pictures to your album.");
|
plist.root.SetString("NSPhotoLibraryUsageDescription", "In order to experience the game better, please allow the APP to save pictures to your album.");
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Touka
|
||||||
{
|
{
|
||||||
private static TKGNativeInterface _instance;
|
private static TKGNativeInterface _instance;
|
||||||
|
|
||||||
private string UnitySDKVersion = "2.2.1";
|
private string UnitySDKVersion = "2.2.6";
|
||||||
|
|
||||||
public static TKGNativeInterface Instance
|
public static TKGNativeInterface Instance
|
||||||
{
|
{
|
||||||
|
@ -109,6 +109,8 @@ namespace Touka
|
||||||
/// <param name="_itemCount"></param>
|
/// <param name="_itemCount"></param>
|
||||||
public abstract void showRewardAd(string _adPos, int _itemCount = -1);
|
public abstract void showRewardAd(string _adPos, int _itemCount = -1);
|
||||||
|
|
||||||
|
|
||||||
|
public abstract void SetShowSDKToast(bool _useSDKToast);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show Reward Ad
|
/// Show Reward Ad
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -394,6 +396,38 @@ namespace Touka
|
||||||
/// <param name="_enable"></param>
|
/// <param name="_enable"></param>
|
||||||
public abstract void SetLogEnable(bool _enable);
|
public abstract void SetLogEnable(bool _enable);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// share txt
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_shareTxt"></param>
|
||||||
|
public abstract void ShareTxt(string _shareTxt);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// regist APNS
|
||||||
|
/// </summary>
|
||||||
|
public abstract void RegistAPNS();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// shake
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiId">notification identifier</param>
|
||||||
|
/// <param name="body">The body of the notification.</param>
|
||||||
|
/// <param name="fireDate">notify after the time interval. format: yyyy-MM-dd HH:mm:ss </param>
|
||||||
|
/// <param name="badge">The application badge number.</param>
|
||||||
|
/// <param name="title">The title of the notification.</param>
|
||||||
|
/// <param name="subTitle">The subtitle of the notification.</param>
|
||||||
|
public abstract void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove all notification
|
||||||
|
/// </summary>
|
||||||
|
public abstract void RemoveAllNotifications();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// remove notification by notification identifier
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="notiId">notification identifier</param>
|
||||||
|
public abstract void RemoveNotification(string notiId);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region other callback
|
#region other callback
|
||||||
|
@ -408,6 +442,11 @@ namespace Touka
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract void SetUserSourceCallback(AndroidTKGUserSourceCalllback _userSourceCallback);
|
public abstract void SetUserSourceCallback(AndroidTKGUserSourceCalllback _userSourceCallback);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// set user source callback with CampaignName
|
||||||
|
/// </summary>
|
||||||
|
public abstract void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -205,6 +205,13 @@ namespace Touka
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetShowSDKToast(bool _useSDKToast)
|
||||||
|
{
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public override void ShowNativeAd(RectTransform pRect, Camera pCam = null, string pAdPos = "")
|
public override void ShowNativeAd(RectTransform pRect, Camera pCam = null, string pAdPos = "")
|
||||||
{
|
{
|
||||||
#if UNITY_ANDROID
|
#if UNITY_ANDROID
|
||||||
|
@ -579,9 +586,8 @@ namespace Touka
|
||||||
/// <param name="_enable"></param>
|
/// <param name="_enable"></param>
|
||||||
public override void SetLogEnable(bool _enable)
|
public override void SetLogEnable(bool _enable)
|
||||||
{
|
{
|
||||||
SDKCall("setLogEnable", _enable);
|
SDKCall("setEnableLog", _enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Others (Uncommon)
|
#region Others (Uncommon)
|
||||||
|
@ -662,6 +668,35 @@ namespace Touka
|
||||||
SDKCall("pushMsg");
|
SDKCall("pushMsg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// <summary>
|
||||||
|
/// share txt
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_shareTxt"></param>
|
||||||
|
public override void ShareTxt(string _shareTxt)
|
||||||
|
{
|
||||||
|
SDKCall("localShareTxt", _shareTxt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RegistAPNS()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RemoveNotification(string notiId)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RemoveAllNotifications()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region common callback
|
#region common callback
|
||||||
|
@ -676,6 +711,12 @@ namespace Touka
|
||||||
SDKCall("getUserSource", _userSourceCallback);
|
SDKCall("getUserSource", _userSourceCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback)
|
||||||
|
{
|
||||||
|
SDKCall("getUserSource", _userSourceCallback);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -499,6 +499,11 @@ namespace Touka
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public override void RemoveNativeAd()
|
public override void RemoveNativeAd()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -513,6 +518,37 @@ namespace Touka
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void ShareTxt(string _shareTxt)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void RegistAPNS()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RemoveNotification(string notiId)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RemoveAllNotifications()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void SetShowSDKToast(bool _useSDKToast)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace Touka
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Ads Show
|
#region Ads Show
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show banner Ad
|
/// Show banner Ad
|
||||||
|
@ -159,6 +159,13 @@ namespace Touka
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetShowSDKToast(bool _useSDKToast)
|
||||||
|
{
|
||||||
|
#if !UNITY_EDITOR
|
||||||
|
TGiOSAdManager.Instance.ShowSDKToast(_useSDKToast);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show FullScreen Ad(is RV without reward callback)
|
/// Show FullScreen Ad(is RV without reward callback)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -495,7 +502,42 @@ namespace Touka
|
||||||
TGiOSAdManager.Instance.OpenMoreGame();
|
TGiOSAdManager.Instance.OpenMoreGame();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
// <summary>
|
||||||
|
/// share txt
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_shareTxt"></param>
|
||||||
|
public override void ShareTxt(string _shareTxt)
|
||||||
|
{
|
||||||
|
TGiOSAdManager.Instance.share(_shareTxt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RegistAPNS()
|
||||||
|
{
|
||||||
|
#if !UNITY_EDITOR
|
||||||
|
TGiOSAdManager.Instance.registAPNS();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RegistNotification(string notiId, string body, string fireDate, int badge, string title, string subTitle)
|
||||||
|
{
|
||||||
|
#if !UNITY_EDITOR
|
||||||
|
TGiOSAdManager.Instance.registNotification(notiId,body,fireDate,badge,title,subTitle);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RemoveNotification(string notiId)
|
||||||
|
{
|
||||||
|
#if !UNITY_EDITOR
|
||||||
|
TGiOSAdManager.Instance.removeNotification(notiId);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void RemoveAllNotifications()
|
||||||
|
{
|
||||||
|
#if !UNITY_EDITOR
|
||||||
|
TGiOSAdManager.Instance.removeAllNotifications();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Others (Uncommon)
|
#region Others (Uncommon)
|
||||||
|
@ -564,7 +606,9 @@ namespace Touka
|
||||||
/// <param name="_content"></param>
|
/// <param name="_content"></param>
|
||||||
public override void toast(string _content)
|
public override void toast(string _content)
|
||||||
{
|
{
|
||||||
|
#if !UNITY_EDITOR
|
||||||
|
TGiOSAdManager.Instance.Toast(_content);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -589,7 +633,12 @@ namespace Touka
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetUserSourceCallback(AndroidTKGUserSourceCalllbackWithCampaignName _userSourceCallback)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,9 @@ namespace Touka
|
||||||
// tkg user source
|
// tkg user source
|
||||||
public static Action<bool, string> mTKGUserSourceCallback = null;
|
public static Action<bool, string> mTKGUserSourceCallback = null;
|
||||||
|
|
||||||
|
// tkg user source
|
||||||
|
public static Action<bool, string, string> mTKGUserSourceCallbackWithCampaignName = null;
|
||||||
|
|
||||||
// tkg common callback
|
// tkg common callback
|
||||||
public static Action<CommonCallbackCode, string> mTKGCommonCallback = null;
|
public static Action<CommonCallbackCode, string> mTKGCommonCallback = null;
|
||||||
|
|
||||||
|
@ -86,6 +89,16 @@ namespace Touka
|
||||||
mTKGUserSourceCallback = _userSourceCallbackAction;
|
mTKGUserSourceCallback = _userSourceCallbackAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// set user source callback with CampaignName
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_userSourceCallbackAction"></param>
|
||||||
|
public static void SetTKGUserSourceCallback(Action<bool, string, string> _userSourceCallbackWithCampaignNameAction)
|
||||||
|
{
|
||||||
|
mTKGUserSourceCallbackWithCampaignName = _userSourceCallbackWithCampaignNameAction;
|
||||||
|
}
|
||||||
|
|
||||||
public static void SetRewardClickCallback(Action _rewardClickAction)
|
public static void SetRewardClickCallback(Action _rewardClickAction)
|
||||||
{
|
{
|
||||||
mRewardClickCallback = _rewardClickAction;
|
mRewardClickCallback = _rewardClickAction;
|
||||||
|
|
|
@ -336,6 +336,25 @@ namespace Touka
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tkg callback
|
||||||
|
/// </summary>
|
||||||
|
public class AndroidTKGUserSourceCalllbackWithCampaignName : AndroidJavaProxy
|
||||||
|
{
|
||||||
|
public AndroidTKGUserSourceCalllbackWithCampaignName() : base("com.touka.tkg.idal.UserSourceCallbackWithType") { }
|
||||||
|
|
||||||
|
public void onResult(bool _isOrganic, string _userSource,string campaignName)
|
||||||
|
{
|
||||||
|
TKGDebugger.LogDebug("TKGCallback onCall, isOrganic : " + _isOrganic + " , userSource : " + _userSource + " , campaignName : " + campaignName);
|
||||||
|
if(TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName != null)
|
||||||
|
{
|
||||||
|
TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName.Invoke(_isOrganic, _userSource,campaignName);
|
||||||
|
TKGSDKCallback.mTKGUserSourceCallbackWithCampaignName = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Loom.QueueOnMainThread((pObj) =>
|
Loom.QueueOnMainThread((pObj) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -225,18 +225,7 @@ namespace Touka
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_IPHONE
|
#if UNITY_IPHONE
|
||||||
[DllImport("__Internal")]
|
|
||||||
private static extern void _EventObject(string eventID, string jsonStr);
|
|
||||||
[DllImport("__Internal")]
|
|
||||||
private static extern void _RegisterSuperProperty(string jsonStr);
|
|
||||||
[DllImport("__Internal")]
|
|
||||||
private static extern void _UnregisterSuperProperty(string propertyName);
|
|
||||||
[DllImport("__Internal")]
|
|
||||||
private static extern string _GetSuperProperties();
|
|
||||||
[DllImport("__Internal")]
|
|
||||||
private static extern void _ClearSuperProperties();
|
|
||||||
[DllImport("__Internal")]
|
|
||||||
private static extern void _SetFirstLaunchEvent(string[] propertyName,int len);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 9d20c22a55c184e4999fe7185f147b03
|
guid: 9d20c22a55c184e4999fe7185f147b03
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
timeCreated: 1451904390
|
|
||||||
licenseType: Store
|
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
assetBundleVariant:
|
assetBundleVariant:
|
||||||
|
|
|
@ -18,10 +18,10 @@ PlayerSettings:
|
||||||
cursorHotspot: {x: 0, y: 0}
|
cursorHotspot: {x: 0, y: 0}
|
||||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||||
m_ShowUnitySplashScreen: 1
|
m_ShowUnitySplashScreen: 1
|
||||||
m_ShowUnitySplashLogo: 1
|
m_ShowUnitySplashLogo: 0
|
||||||
m_SplashScreenOverlayOpacity: 1
|
m_SplashScreenOverlayOpacity: 1
|
||||||
m_SplashScreenAnimation: 1
|
m_SplashScreenAnimation: 0
|
||||||
m_SplashScreenLogoStyle: 1
|
m_SplashScreenLogoStyle: 0
|
||||||
m_SplashScreenDrawMode: 0
|
m_SplashScreenDrawMode: 0
|
||||||
m_SplashScreenBackgroundAnimationZoom: 1
|
m_SplashScreenBackgroundAnimationZoom: 1
|
||||||
m_SplashScreenLogoAnimationZoom: 1
|
m_SplashScreenLogoAnimationZoom: 1
|
||||||
|
|
Loading…
Reference in New Issue