fix 去掉了直接获得奖励的代码;结局按钮直接弹出来面板;

This commit is contained in:
zhangjie0072 2022-08-09 10:01:52 +08:00
parent d8f2bcb9ee
commit 850af84078
5 changed files with 25 additions and 8 deletions

View File

@ -14,12 +14,12 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
a: 0 a: 0
b: 0 b: 0
c: tt48073ebad739259407 c:
d: d:
e: 2 e: 2
f: 1 f: 1
g: 0 g: 0
h: 1 h: 0
i: 2 i: 2
j: 0 j: 0
k: 0 k: 0

View File

@ -101,8 +101,8 @@ public class LevelPage : PageView
} }
}); });
PlayerData.Instance.UnlockNewLevel(false); //PlayerData.Instance.UnlockNewLevel(false);
LoadData(true); //LoadData(true);
} }
private void OnClickShareUnlockLevel(int pLevelIndex) private void OnClickShareUnlockLevel(int pLevelIndex)

View File

@ -49,7 +49,7 @@ public class PanelGame : BasePanel
UIUtils.BindBtn(mBtnMenu, OnClickMenu, AudioClipType.Click_Tip); UIUtils.BindBtn(mBtnMenu, OnClickMenu, AudioClipType.Click_Tip);
UIUtils.BindBtn(mBtnPlay, OnClickPlay, AudioClipType.Click_Play); UIUtils.BindBtn(mBtnPlay, OnClickPlay, AudioClipType.Click_Play);
mBtnEndings.DelClick = OnClickEndings; mBtnEndings.DelClick = OnClickShowEndingsDirectly;
mAni = GetComponent<PanelGameAni>(); mAni = GetComponent<PanelGameAni>();
@ -200,6 +200,12 @@ public class PanelGame : BasePanel
} }
} }
private void OnClickShowEndingsDirectly()
{
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
}
private void OnClickPlay() private void OnClickPlay()
{ {
mGobTapTip.SetActive(false); mGobTapTip.SetActive(false);

View File

@ -59,7 +59,7 @@ public class PanelResult : BasePanel
UIUtils.BindBtn(mBtnSkip, OnClickSkip, AudioClipType.Click_Normal); UIUtils.BindBtn(mBtnSkip, OnClickSkip, AudioClipType.Click_Normal);
UIUtils.BindBtn(mBtnShareSkip, OnClickShareSkip, AudioClipType.Click_Normal); UIUtils.BindBtn(mBtnShareSkip, OnClickShareSkip, AudioClipType.Click_Normal);
mBtnEndings.DelClick = OnClickEndings; mBtnEndings.DelClick = OnClickShowEndingsDirectly;
string platform = StarkSDK.API.GetSystemInfo().platform; string platform = StarkSDK.API.GetSystemInfo().platform;
@ -213,6 +213,12 @@ public class PanelResult : BasePanel
} }
} }
private void OnClickShowEndingsDirectly()
{
PanelEndings tUIEndings = UIManager.Instance.OpenUI<PanelEndings>();
tUIEndings.Init(PlayerData.Instance.CurrentLevelID);
}
private void OnClickSkip() private void OnClickSkip()
{ {
TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_end_skip, (pResult) => TKGSDKManager.Instance.ShowRewardAd(TKGRVPositionName.RV_end_skip, (pResult) =>
@ -224,8 +230,8 @@ public class PanelResult : BasePanel
} }
}); });
PlayerData.Instance.UnlockNewLevel(); //PlayerData.Instance.UnlockNewLevel();
GameManager.Instance.NextLevel(); //GameManager.Instance.NextLevel();
} }
private void OnClickShareSkip() private void OnClickShareSkip()

View File

@ -400,6 +400,11 @@ namespace Touka
}, (errcode, errmessage) => }, (errcode, errmessage) =>
{ {
Debug.Log("失败回调, errorcode : " + errcode + " , errmessage : " + errmessage); Debug.Log("失败回调, errorcode : " + errcode + " , errmessage : " + errmessage);
if (TKGSDKCallback.mRewardShowFailedCallback != null)
{
TKGSDKCallback.mRewardShowFailedCallback.Invoke();
TKGSDKCallback.mRewardShowFailedCallback = null;
}
}, null); }, null);
#endif #endif
} }