抖音1.0.0版本需求
|
@ -14,12 +14,12 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
a: 0
|
||||
b: 0
|
||||
c:
|
||||
c: tt48073ebad739259407
|
||||
d:
|
||||
e: 2
|
||||
f: 1
|
||||
g: 0
|
||||
h: 0
|
||||
h: 1
|
||||
i: 2
|
||||
j: 0
|
||||
k: 0
|
||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.4 KiB |
|
@ -0,0 +1,98 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c6aeda3dd7d4f4d479ea0699f9788d40
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 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: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -6170,7 +6170,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 67, y: 65}
|
||||
m_SizeDelta: {x: 79, y: 65}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3670717437110786347
|
||||
CanvasRenderer:
|
||||
|
|
|
@ -1063,7 +1063,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1969282076206099682
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1079,6 +1079,7 @@ RectTransform:
|
|||
- {fileID: 1969282074757018001}
|
||||
- {fileID: 1969282075994291295}
|
||||
- {fileID: 1969282075043006506}
|
||||
- {fileID: 1903586220812881320}
|
||||
m_Father: {fileID: 6904755266457718618}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -1102,7 +1103,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1969282076287431323
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1662,6 +1663,127 @@ MonoBehaviour:
|
|||
optionalRotationMode: 0
|
||||
optionalScrambleMode: 0
|
||||
optionalString:
|
||||
--- !u!1 &4591847253917254852
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1903586220812881320}
|
||||
- component: {fileID: 8723098882427680438}
|
||||
- component: {fileID: 4485148829023397242}
|
||||
- component: {fileID: 3661859221081250213}
|
||||
m_Layer: 5
|
||||
m_Name: Btn_SuccShare
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1903586220812881320
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4591847253917254852}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1969282076206099682}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -106}
|
||||
m_SizeDelta: {x: 203, y: 83}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8723098882427680438
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4591847253917254852}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4485148829023397242
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4591847253917254852}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: c6aeda3dd7d4f4d479ea0699f9788d40, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &3661859221081250213
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4591847253917254852}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 4485148829023397242}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &5297361318260817023
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2590,6 +2712,7 @@ MonoBehaviour:
|
|||
mBtnAgain1: {fileID: 1969282074757018006}
|
||||
mBtnNext: {fileID: 1969282075994291292}
|
||||
mBtnChoose: {fileID: 1969282075043006507}
|
||||
mBtnSuccShare: {fileID: 3661859221081250213}
|
||||
mBtnAgain2: {fileID: 1969282075864200459}
|
||||
mBtnTip: {fileID: 888830189749965682}
|
||||
mBtnSkip: {fileID: 3999716281573587820}
|
||||
|
|
|
@ -322,6 +322,11 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: TopCanvas
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1388380085593528138, guid: c725d095448404344abe6668b8731a42,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1388380085593528139, guid: c725d095448404344abe6668b8731a42,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
|
|
|
@ -27,6 +27,11 @@ public class GameLogic : MonoBehaviour
|
|||
|
||||
//TKGSDKManager.Instance.NotifyGameStart(PlayerData.Instance.CurrentLevel);
|
||||
//TKGSDKManager.Instance.LogEvent(Const.AdsEvent.StartGame, Const.AdsEvtID.Level, PlayerData.Instance.CurrentLevel.ToString());
|
||||
|
||||
TKGSDKManager.Instance.ScreenRecordingLogic(TKGSDKManager.SCLCategory.开始, "share title", new List<string>() { "尖叫吧小鸡仔" }, () =>
|
||||
{
|
||||
Debug.Log("分享结束 ----");
|
||||
});
|
||||
}
|
||||
|
||||
private void PlayFilm(int[] pSoundOrder)
|
||||
|
@ -70,6 +75,12 @@ public class GameLogic : MonoBehaviour
|
|||
|
||||
PanelResult tUIResult = UIManager.Instance.OpenUI<PanelResult>();
|
||||
tUIResult.ReviewShowed = false;// !TKGSDKManager.Instance.NotifyGameEnd(PlayerData.Instance.CurrentLevel, tIsWin);
|
||||
|
||||
TKGSDKManager.Instance.ScreenRecordingLogic(TKGSDKManager.SCLCategory.结束, "share title", new List<string>() { "尖叫吧小鸡仔" }, () =>
|
||||
{
|
||||
Debug.Log("分享结束 ----");
|
||||
});
|
||||
|
||||
bool tHasComplete = PlayerData.Instance.EndingCountOfLevel(PlayerData.Instance.CurrentLevelID) == tLvData.Endings.Count;
|
||||
if (tEndingID >= 0)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ public class EndingCell : MonoBehaviour
|
|||
}
|
||||
else if(TKGSDKManager.Instance.GetRewardWay() == TKGSDKManager.WayOfReward.RewardAd) // 只展示激励视频广告
|
||||
{
|
||||
mBtnShareTip.gameObject.SetActive(true);
|
||||
mBtnAdTip.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
else // 已经看过提示了,就这俩按钮都不展示
|
||||
|
@ -116,7 +116,7 @@ public class EndingCell : MonoBehaviour
|
|||
{
|
||||
UIManager.Instance.OpenUI<PanelNoAdsTip>();
|
||||
});
|
||||
WatchAdSucceed(true);
|
||||
//WatchAdSucceed(true);
|
||||
}
|
||||
|
||||
private void OnClickShareTip()
|
||||
|
|
|
@ -52,6 +52,12 @@ public class PanelGame : BasePanel
|
|||
mBtnEndings.DelClick = OnClickEndings;
|
||||
|
||||
mAni = GetComponent<PanelGameAni>();
|
||||
|
||||
#if H5_DY
|
||||
mBtnShareGame.gameObject.SetActive(false);
|
||||
#elif H5_WX
|
||||
mBtnShareGame.gameObject.SetActive(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Init(bool pWithOpening = false)
|
||||
|
@ -164,7 +170,7 @@ public class PanelGame : BasePanel
|
|||
PanelLevel tUILevel = UIManager.Instance.OpenUI<PanelLevel>();
|
||||
tUILevel.Init(true);
|
||||
|
||||
//TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.GamingSelect);
|
||||
TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.gaming_select);
|
||||
}
|
||||
|
||||
private void OnClickMenu()
|
||||
|
@ -174,8 +180,24 @@ public class PanelGame : BasePanel
|
|||
|
||||
private void OnClickEndings()
|
||||
{
|
||||
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
|
||||
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
|
||||
if (!PlayerData.Instance.LevelReachGoodEnding(GameConfig.Instance.LevelSort[PlayerData.Instance.CurrentLevel-1]))
|
||||
{
|
||||
TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_GetTips, (_isReward) =>
|
||||
{
|
||||
if (_isReward)
|
||||
{
|
||||
Debug.Log("CURR LEVEL : " + PlayerData.Instance.CurrentLevel);
|
||||
PlayerData.Instance.AddEndingAdTip(GameConfig.Instance.LevelSort[PlayerData.Instance.CurrentLevel-1], 0);
|
||||
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
|
||||
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
|
||||
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClickPlay()
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if H5_DY
|
||||
using StarkSDKSpace;
|
||||
#endif
|
||||
|
||||
public class PanelResult : BasePanel
|
||||
{
|
||||
public Action DelAgain;
|
||||
|
@ -27,6 +32,7 @@ public class PanelResult : BasePanel
|
|||
[SerializeField] Button mBtnAgain1;
|
||||
[SerializeField] Button mBtnNext;
|
||||
[SerializeField] Button mBtnChoose;
|
||||
[SerializeField] Button mBtnSuccShare;
|
||||
|
||||
[SerializeField] Button mBtnAgain2;
|
||||
[SerializeField] Button mBtnTip;
|
||||
|
@ -45,6 +51,8 @@ public class PanelResult : BasePanel
|
|||
UIUtils.BindBtn(mBtnAgain1, OnClickAgain, AudioClipType.Click_Normal);
|
||||
UIUtils.BindBtn(mBtnNext, OnClickNext, AudioClipType.Click_Normal);
|
||||
UIUtils.BindBtn(mBtnChoose, OnClickChoose, AudioClipType.Click_Normal);
|
||||
UIUtils.BindBtn(mBtnSuccShare, OnClickSuccShare, AudioClipType.Click_Normal);
|
||||
|
||||
|
||||
UIUtils.BindBtn(mBtnAgain2, OnClickAgain, AudioClipType.Click_Normal);
|
||||
UIUtils.BindBtn(mBtnTip, OnClickEndings, AudioClipType.Click_Normal);
|
||||
|
@ -52,6 +60,24 @@ public class PanelResult : BasePanel
|
|||
UIUtils.BindBtn(mBtnShareSkip, OnClickShareSkip, AudioClipType.Click_Normal);
|
||||
|
||||
mBtnEndings.DelClick = OnClickEndings;
|
||||
|
||||
string platform = StarkSDK.API.GetSystemInfo().platform;
|
||||
|
||||
#if H5_DY
|
||||
if (platform != null && platform.ToLower().Contains("ios"))
|
||||
{
|
||||
mBtnSuccShare.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
mBtnSuccShare.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
mBtnShareResult.gameObject.SetActive(false);
|
||||
#else
|
||||
mBtnSuccShare.gameObject.SetActive(false);
|
||||
mBtnShareResult.gameObject.SetActive(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void OnFocus(bool pFocus)
|
||||
|
@ -123,7 +149,7 @@ public class PanelResult : BasePanel
|
|||
|
||||
if (!ReviewShowed)
|
||||
{
|
||||
//TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndRetry);
|
||||
TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_retry);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,7 +161,7 @@ public class PanelResult : BasePanel
|
|||
|
||||
if (!ReviewShowed)
|
||||
{
|
||||
//TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndNext);
|
||||
TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_next);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,10 +174,18 @@ public class PanelResult : BasePanel
|
|||
|
||||
if (!ReviewShowed)
|
||||
{
|
||||
//TKGSDKManager.Instance.PlayInterstitialAd(Const.AdsEvtValue.EndSelect);
|
||||
TKGSDKManager.Instance.ShowInterstitialAd(TKGIVAdPositionName.end_game_select);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClickSuccShare()
|
||||
{
|
||||
TKGSDKManager.Instance.ScreenRecordingLogic(TKGSDKManager.SCLCategory.分享, "share title", new List<string>() { "尖叫吧小鸡仔" }, () =>
|
||||
{
|
||||
Debug.Log("分享结束 ----");
|
||||
});
|
||||
}
|
||||
|
||||
private void OnClickShareResult()
|
||||
{
|
||||
TKGSDKManager.Instance.ShareShareAppMessageByType(TKGSDKManager.ShareType.ShareAppOriginImg);
|
||||
|
@ -159,8 +193,24 @@ public class PanelResult : BasePanel
|
|||
|
||||
private void OnClickEndings()
|
||||
{
|
||||
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
|
||||
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
|
||||
if (!PlayerData.Instance.LevelReachGoodEnding(GameConfig.Instance.LevelSort[PlayerData.Instance.CurrentLevel - 1]))
|
||||
{
|
||||
TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_GetTips, (_isReward) =>
|
||||
{
|
||||
if (_isReward)
|
||||
{
|
||||
Debug.Log("CURR LEVEL : " + PlayerData.Instance.CurrentLevel);
|
||||
PlayerData.Instance.AddEndingAdTip(GameConfig.Instance.LevelSort[PlayerData.Instance.CurrentLevel - 1], 0);
|
||||
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
|
||||
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
|
||||
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClickSkip()
|
||||
|
|
|
@ -178,6 +178,7 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
|||
return;
|
||||
|
||||
#endif
|
||||
Debug.Log("TKGSDKManager ShowInterstitialAd pos : " + _adPos.ToString());
|
||||
if (IsNoAllAD || IsRemoveAds)
|
||||
{
|
||||
_callback?.Invoke();
|
||||
|
@ -642,7 +643,11 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
|||
|
||||
public WayOfReward GetRewardWay()
|
||||
{
|
||||
#if H5_DY
|
||||
return WayOfReward.RewardAd;
|
||||
#elif H5_WX
|
||||
return WayOfReward.Share;
|
||||
#endif
|
||||
}
|
||||
|
||||
public void ShareShareAppMessageByType(ShareType _shareType = ShareType.ShareAppOriginImg)
|
||||
|
@ -758,13 +763,19 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
|||
#endif
|
||||
}
|
||||
|
||||
#region dy
|
||||
#region dy
|
||||
|
||||
/// <summary>
|
||||
/// 录屏 只支持安卓
|
||||
/// </summary>
|
||||
public void ScreenRecordingLogic(SCLCategory sCLCategory, string title, List<string> topics, System.Action actA = null)
|
||||
{
|
||||
string platform = StarkSDK.API.GetSystemInfo().platform;
|
||||
if (platform != null && platform.ToLower().Contains("ios"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool flg = StarkSDKSpace.CanIUse.GetStarkGameRecorder;
|
||||
Debug.Log("can use flg : " + flg + " , sCLCategory : " + sCLCategory);
|
||||
switch (sCLCategory)
|
||||
|
@ -783,6 +794,10 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
|||
if (StarkSDK.API.GetStarkGameRecorder().GetVideoRecordState() == StarkSDKSpace.StarkGameRecorder.VideoRecordState.RECORD_COMPLETED)
|
||||
{
|
||||
Debug.Log("call 录制结束了,可以分享");
|
||||
|
||||
int tipIndex = GetRandomIndex();
|
||||
string titleTemp = GetRandomShareTips(tipIndex);
|
||||
|
||||
StarkSDKSpace.StarkSDK.API.GetStarkGameRecorder().ShareVideoWithTitleTopics((_onShareVideoSuccessCallback) => {
|
||||
Debug.Log("分享成功,获得奖励"); actA?.Invoke();
|
||||
}, (errMsg) => {
|
||||
|
@ -796,7 +811,7 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
|||
PopupTipsPanel.PopupTips("分享失败,请重新录制");
|
||||
}
|
||||
}, () => { Debug.Log("取消分享");
|
||||
}, title, topics);
|
||||
}, titleTemp, topics);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -837,7 +852,7 @@ public class TKGSDKManager : TKGSingleton<TKGSDKManager>
|
|||
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
|
@ -15,6 +15,10 @@ public enum TKGIVAdPositionName
|
|||
IV_Retry,
|
||||
IV_NextLevel,
|
||||
IV_Back,
|
||||
gaming_select,
|
||||
end_game_retry,
|
||||
end_game_next,
|
||||
end_game_select
|
||||
}
|
||||
|
||||
public enum TKGNativePositionName
|
||||
|
|
|
@ -3,10 +3,13 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
#if H5_WX
|
||||
using WeChatWASM;
|
||||
#elif H5_DY
|
||||
using StarkSDKSpace;
|
||||
#endif
|
||||
|
||||
namespace Touka
|
||||
|
@ -24,8 +27,19 @@ namespace Touka
|
|||
private WXInterstitialAd interstitialAd;
|
||||
private WXRewardedVideoAd rewardAd;
|
||||
private WeChatWASM.SystemInfo sysInfo;
|
||||
#elif H5_DY
|
||||
public string DY_RV_ID = "oa31oo12lhr20333ed";
|
||||
public string DY_IV_ID = "dd5iaf297h193cbbfn";
|
||||
public string DY_Banner_ID = "";
|
||||
|
||||
private int px2dp(int px) => (int)(px * (160 / Screen.dpi));
|
||||
StarkAdManager.BannerStyle m_style = new StarkAdManager.BannerStyle();
|
||||
StarkAdManager.BannerAd m_bannerAdIns = null;
|
||||
|
||||
StarkAdManager.InterstitialAd m_interstitalAd = null;
|
||||
#endif
|
||||
|
||||
|
||||
public TKGNativeInterfaceWebgl()
|
||||
{
|
||||
|
||||
|
@ -57,8 +71,9 @@ namespace Touka
|
|||
#endif
|
||||
|
||||
#if H5_DY
|
||||
|
||||
//StarkSDKSpace.StarkSDK.API.GetStarkAdManager();
|
||||
StarkSDK.API.GetStarkAdManager();
|
||||
_initCallback();
|
||||
initAds();
|
||||
#endif
|
||||
TKGDebugger.LogDebug("init ----- 02");
|
||||
}
|
||||
|
@ -128,9 +143,65 @@ namespace Touka
|
|||
//拉取的广告可能跟设置的不一样,需要动态调整位置
|
||||
bannerAd.style.top = (int)sysInfo.windowHeight - res.height;
|
||||
});
|
||||
#elif H5_DY
|
||||
m_style.width = 320;
|
||||
m_style.left = 10;
|
||||
m_style.top = 100;
|
||||
m_bannerAdIns = StarkSDK.API.GetStarkAdManager().CreateBannerAd(DY_Banner_ID, m_style, 30,
|
||||
OnAdError, OnBannerLoaded, OnBannerResize);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// banner callback error
|
||||
/// </summary>
|
||||
/// <param name="errorCode"></param>
|
||||
/// <param name="errorMsg"></param>
|
||||
private void OnAdError(int errorCode, string errorMsg)
|
||||
{
|
||||
Debug.Log("OnAdError, errorCode : " + errorCode + " , errorMsg : " + errorMsg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// on banner loaded
|
||||
/// </summary>
|
||||
private void OnBannerLoaded()
|
||||
{
|
||||
Debug.Log("OnBannerLoaded");
|
||||
|
||||
if (m_bannerAdIns != null)
|
||||
|
||||
m_bannerAdIns.Show();
|
||||
ChangeBannerStyle();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// on banner resize
|
||||
/// </summary>
|
||||
/// <param name="width"></param>
|
||||
/// <param name="height"></param>
|
||||
private void OnBannerResize(int width, int height)
|
||||
{
|
||||
Debug.Log("OnBannerResize, width : " + width + " , height : " + height);
|
||||
}
|
||||
|
||||
private void ChangeBannerStyle()
|
||||
{
|
||||
int w = m_style.width; //获取banner宽度大小
|
||||
int h = m_style.height; //获取banner高度大小
|
||||
int sw = px2dp(Screen.width); //获得屏幕宽度(dp)
|
||||
int sh = px2dp(Screen.height); //获得屏幕高度(dp)
|
||||
|
||||
m_style.top = sh - h; //底部
|
||||
m_style.left = sw / 2 - w / 2; //中央
|
||||
m_style.width = w;
|
||||
|
||||
if(m_bannerAdIns != null)
|
||||
{
|
||||
m_bannerAdIns.ReSize(m_style); //使用Resize函数调整位置和大小
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show banner Ad
|
||||
///
|
||||
|
@ -184,9 +255,39 @@ namespace Touka
|
|||
{
|
||||
adUnitId = ""
|
||||
});
|
||||
|
||||
#elif H5_DY
|
||||
//CreateAndLoadIV();
|
||||
#endif
|
||||
}
|
||||
|
||||
private void CreateAndLoadIV()
|
||||
{
|
||||
m_interstitalAd = StarkSDK.API.GetStarkAdManager().CreateInterstitialAd(DY_IV_ID, OnIVError, OnIVClose, OnIVLoaded);
|
||||
}
|
||||
|
||||
private void OnIVError(int errorCode, string errorMsg)
|
||||
{
|
||||
Debug.Log("OnIVError, errorCode : " + errorCode + " , errorMsg : " + errorMsg);
|
||||
}
|
||||
|
||||
private void OnIVClose()
|
||||
{
|
||||
if(m_interstitalAd != null)
|
||||
{
|
||||
m_interstitalAd.Destory();
|
||||
}
|
||||
m_interstitalAd = null;
|
||||
}
|
||||
|
||||
private void OnIVLoaded()
|
||||
{
|
||||
if(m_interstitalAd != null)
|
||||
{
|
||||
Debug.Log("m_interstitalAd OnIVLoaded");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show Interstitial Ad
|
||||
/// </summary>
|
||||
|
@ -212,9 +313,38 @@ namespace Touka
|
|||
{
|
||||
Debug.Log("tkg native webgl showInterstitialAd ----- 02");
|
||||
}
|
||||
#elif H5_DY
|
||||
|
||||
#if UNITY_WEBGL
|
||||
return;
|
||||
#endif
|
||||
|
||||
if(m_interstitalAd != null)
|
||||
{
|
||||
Debug.Log("in show iv, m_interstitalAd is not null");
|
||||
if (m_interstitalAd.IsLoaded())
|
||||
{
|
||||
Debug.Log("in show iv, m_interstitalAd is loaded");
|
||||
m_interstitalAd.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("in show iv, m_interstitalAd is not loaded");
|
||||
m_interstitalAd.Load();
|
||||
m_interstitalAd.Show();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("in show iv, m_interstitalAd is null");
|
||||
CreateAndLoadIV();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void initRewardAd()
|
||||
{
|
||||
Debug.Log("tkg native webgl initRewardAd -----");
|
||||
|
@ -243,6 +373,34 @@ namespace Touka
|
|||
{
|
||||
Debug.Log("tkg native webgl showRewardAd ----- 02");
|
||||
}
|
||||
#elif H5_DY
|
||||
//抖音
|
||||
StarkSDKSpace.StarkSDK.API.GetStarkAdManager().ShowVideoAdWithId(DY_RV_ID, (isdone) =>
|
||||
{
|
||||
if (isdone)
|
||||
{
|
||||
//播放成功
|
||||
//RecordEvents("AdComplete", "WhereCompleteAd", title);
|
||||
Debug.Log("关闭回调,播放成功");
|
||||
if (TKGSDKCallback.mRewardCallback != null)
|
||||
{
|
||||
TKGSDKCallback.mRewardCallback.Invoke(true);
|
||||
TKGSDKCallback.mRewardCallback = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("关闭回调,播放失败");
|
||||
if (TKGSDKCallback.mRewardCallback != null)
|
||||
{
|
||||
TKGSDKCallback.mRewardCallback.Invoke(false);
|
||||
TKGSDKCallback.mRewardCallback = null;
|
||||
}
|
||||
}
|
||||
}, (errcode, errmessage) =>
|
||||
{
|
||||
Debug.Log("失败回调, errorcode : " + errcode + " , errmessage : " + errmessage);
|
||||
}, null);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|