Merge branch 'dev' of http://git.juzugame.com/b6-client/b6-lua into dev
This commit is contained in:
commit
ededa19132
@ -35,6 +35,7 @@ BIReport.ACCOUNT_OPT_TYPE = {
|
|||||||
LOGIN_FAILED = "LoginFailed",
|
LOGIN_FAILED = "LoginFailed",
|
||||||
BIND_CLICK = "BindClick",
|
BIND_CLICK = "BindClick",
|
||||||
BIND_FINISH = "BindFinish",
|
BIND_FINISH = "BindFinish",
|
||||||
|
DELETE = "Delete"
|
||||||
}
|
}
|
||||||
|
|
||||||
BIReport.CHAPTER_OPT_TYPE = {
|
BIReport.CHAPTER_OPT_TYPE = {
|
||||||
@ -765,7 +766,6 @@ function BIReport:postMailOpen(mailId)
|
|||||||
event_type = BIReport.MAIL_OPT_TYPE.OPEN,
|
event_type = BIReport.MAIL_OPT_TYPE.OPEN,
|
||||||
}
|
}
|
||||||
self:report(EVENT_NAME_MAIL_OPT, args)
|
self:report(EVENT_NAME_MAIL_OPT, args)
|
||||||
BIReport:printArgsStr(EVENT_NAME_MAIL_OPT, args)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function BIReport:postMailClaim(mailId)
|
function BIReport:postMailClaim(mailId)
|
||||||
@ -778,7 +778,14 @@ function BIReport:postMailClaim(mailId)
|
|||||||
event_type = BIReport.MAIL_OPT_TYPE.CLAIM,
|
event_type = BIReport.MAIL_OPT_TYPE.CLAIM,
|
||||||
}
|
}
|
||||||
self:report(EVENT_NAME_MAIL_OPT, args)
|
self:report(EVENT_NAME_MAIL_OPT, args)
|
||||||
BIReport:printArgsStr(EVENT_NAME_MAIL_OPT, args)
|
end
|
||||||
|
|
||||||
|
function BIReport:postAccountDelete(loginType)
|
||||||
|
local args = {
|
||||||
|
login_type = loginType,
|
||||||
|
event_type = BIReport.ACCOUNT_OPT_TYPE.DELETE,
|
||||||
|
}
|
||||||
|
self:report(EVENT_NAME_ACCOUNT_OPT, args)
|
||||||
end
|
end
|
||||||
|
|
||||||
return BIReport
|
return BIReport
|
||||||
@ -49,6 +49,8 @@ local MODULE_PATHS = {
|
|||||||
MailManager = "app/module/mail/mail_manager",
|
MailManager = "app/module/mail/mail_manager",
|
||||||
-- 玩家
|
-- 玩家
|
||||||
PlayerManager = "app/module/player/player_manager",
|
PlayerManager = "app/module/player/player_manager",
|
||||||
|
-- 账号
|
||||||
|
AccountManager= "app/module/account/account_manager",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- 这里的key对应func_open里的id
|
-- 这里的key对应func_open里的id
|
||||||
|
|||||||
@ -35,7 +35,7 @@ local CONST_METATABLE = {
|
|||||||
}
|
}
|
||||||
setmetatable(GConst, CONST_METATABLE)
|
setmetatable(GConst, CONST_METATABLE)
|
||||||
|
|
||||||
GConst.ANDROID_STORE_URL = "https://play.google.com/store/apps/details?id=com.cobby.lonelysurvivor"
|
GConst.ANDROID_STORE_URL = "https://play.google.com/store/apps/details?id=com.knight.connect.rpg"
|
||||||
GConst.IOS_STORE_URL = "https://itunes.apple.com/app/1637393009"
|
GConst.IOS_STORE_URL = "https://itunes.apple.com/app/1637393009"
|
||||||
GConst.SKIP_VERSION = CS.BF.GameConst.SKIP_VERSION
|
GConst.SKIP_VERSION = CS.BF.GameConst.SKIP_VERSION
|
||||||
GConst.DESIGN_RESOLUTION_WIDTH = CS.BF.GameConst.DESIGN_RESOLUTION_WIDTH
|
GConst.DESIGN_RESOLUTION_WIDTH = CS.BF.GameConst.DESIGN_RESOLUTION_WIDTH
|
||||||
|
|||||||
@ -336,16 +336,6 @@ function GFunc.showMessageBox(params)
|
|||||||
MessageBox:showMessageBox(params)
|
MessageBox:showMessageBox(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
function GFunc.showCheatingBox(params)
|
|
||||||
local CheatMessageBox = require "app/ui/common/cheat_message_box"
|
|
||||||
CheatMessageBox:showCheatMessageBox(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
function GFunc.hideCheatingBox()
|
|
||||||
local CheatMessageBox = require "app/ui/common/cheat_message_box"
|
|
||||||
CheatMessageBox:hideCheatMessageBox()
|
|
||||||
end
|
|
||||||
|
|
||||||
function GFunc.showToast(params)
|
function GFunc.showToast(params)
|
||||||
ModuleManager.ToastManager:showToast(params)
|
ModuleManager.ToastManager:showToast(params)
|
||||||
end
|
end
|
||||||
|
|||||||
8
lua/app/module/account.meta
Normal file
8
lua/app/module/account.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b8f4a8cf53417314abb0cba97d791459
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
28
lua/app/module/account/account_manager.lua
Normal file
28
lua/app/module/account/account_manager.lua
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
local AccountManager = class("AccountManager", BaseModule)
|
||||||
|
|
||||||
|
function AccountManager:showBindUI()
|
||||||
|
if DataManager.PlayerData:isBinded() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
UIManager:showUI("app/ui/game_setting/setting_binding_ui")
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountManager:showDeleteUI()
|
||||||
|
return UIManager:showUI("app/ui/game_setting/account_delete_ui")
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountManager:deleteAccount()
|
||||||
|
self:sendMessage(ProtoMsgType.FromMsgEnum.DeleteReq, {}, {}, self.onDeleteAccount, BIReport.ITEM_GET_TYPE.NONE)
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountManager:onDeleteAccount(result)
|
||||||
|
if result.err_code == GConst.ERROR_STR.SUCCESS then -- 删除账号成功
|
||||||
|
local info = LocalData:getLastLoginInfo()
|
||||||
|
BIReport:postAccountDelete(info.type)
|
||||||
|
ModuleManager.LoginManager:goToLoginScene()
|
||||||
|
else
|
||||||
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DELETE_ACCOUNT_FAILED))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return AccountManager
|
||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: ed5cd4e2a31830e439ea9f1e38f55731
|
guid: fbc7bda584c3578478d7e7fe2bb9e7a1
|
||||||
ScriptedImporter:
|
ScriptedImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@ -101,6 +101,7 @@ function LoginManager:goToLoginScene()
|
|||||||
ModuleManager.BattleManager:clearOnExitScene()
|
ModuleManager.BattleManager:clearOnExitScene()
|
||||||
NetManager:closeAndClear()
|
NetManager:closeAndClear()
|
||||||
UIManager:backToLoginWithoutLogout()
|
UIManager:backToLoginWithoutLogout()
|
||||||
|
UIManager:clearUIPrefabCache()
|
||||||
DataManager:clear()
|
DataManager:clear()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -215,12 +215,17 @@ function NetManager:connect(domain, port, callback, socketName)
|
|||||||
pbData.status = not pbData.err_code and 0 or ProtoMsgDispatch:getErrCodeEnum(pbData.err_code)
|
pbData.status = not pbData.err_code and 0 or ProtoMsgDispatch:getErrCodeEnum(pbData.err_code)
|
||||||
if pbData.status ~= 0 then
|
if pbData.status ~= 0 then
|
||||||
self:closeAndClear()
|
self:closeAndClear()
|
||||||
local lastLoginType = LocalData:getLastLoginType()
|
local accountInfo = LocalData:getAccountInfo()
|
||||||
if lastLoginType == NetManager.LOGIN_TYPE.GOOGLE or lastLoginType == NetManager.LOGIN_TYPE.APPLE then
|
local loginType
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local lastLoginType
|
||||||
if lastLoginType == NetManager.LOGIN_TYPE.APPLE then
|
if accountInfo.google_id and accountInfo.google_id ~= "" then
|
||||||
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
end
|
lastLoginType = NetManager.LOGIN_TYPE.GOOGLE
|
||||||
|
elseif accountInfo.apple_id and accountInfo.apple_id ~= "" then
|
||||||
|
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
||||||
|
lastLoginType = NetManager.LOGIN_TYPE.APPLE
|
||||||
|
end
|
||||||
|
if loginType then
|
||||||
SDKManager:login(function(params)
|
SDKManager:login(function(params)
|
||||||
if not params.token then
|
if not params.token then
|
||||||
return
|
return
|
||||||
|
|||||||
@ -1,80 +0,0 @@
|
|||||||
local CheatMessageBox = {}
|
|
||||||
|
|
||||||
function CheatMessageBox:showCheatMessageBox(params)
|
|
||||||
if params and params.noDeleteBtn then
|
|
||||||
CheatMessageBox.noDeleteBtn = true
|
|
||||||
end
|
|
||||||
UIManager:getCheatMessageBox(function(prefabObject)
|
|
||||||
local uiMap = prefabObject:genAllChildren()
|
|
||||||
uiMap["message_box.title_bg_img.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.MESSAGE_BOX_TITLE))
|
|
||||||
uiMap["cheating_ui.title_bg_img.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CHEATING_DESC_1))
|
|
||||||
uiMap["message_box.title_bg_img.ok_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUPPORT_DESSC))
|
|
||||||
uiMap["cheating_box.title_bg_img.delete_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.DELETE_ACCOUNT_DESC))
|
|
||||||
uiMap["cheating_ui.title_bg_img.bg1.player_id_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.COPY_ID))
|
|
||||||
uiMap["cheating_ui.title_bg_img.bg2.player_id_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.COPY_MAIL))
|
|
||||||
|
|
||||||
local objectId = ""
|
|
||||||
uiMap["cheating_ui.title_bg_img.bg1.player_id"]:setText("PlayerID:" .. objectId)
|
|
||||||
uiMap["cheating_ui.title_bg_img.bg2.player_id"]:setText("LonelySurvivorTech@cobbygame.com")
|
|
||||||
|
|
||||||
uiMap["cheating_ui.title_bg_img.bg1.player_id_btn"]:addClickListener(function()
|
|
||||||
-- local objectId = :getServerPlayerId() or ""
|
|
||||||
-- GFunc.copyStr(objectId)
|
|
||||||
end)
|
|
||||||
|
|
||||||
uiMap["cheating_ui.title_bg_img.bg2.player_id_btn"]:addClickListener(function()
|
|
||||||
GFunc.copyStr("LonelySurvivorTech@cobbygame.com")
|
|
||||||
end)
|
|
||||||
|
|
||||||
local okBtn = uiMap["message_box.title_bg_img.ok_btn"]
|
|
||||||
okBtn:addClickListener(function()
|
|
||||||
local subject = "Lonely Survivor(" .. Platform:getClientVersion() .. ")'s Feedback"
|
|
||||||
|
|
||||||
local platform = "Android"
|
|
||||||
if Platform:isIosPlatform() then
|
|
||||||
platform = "IOS"
|
|
||||||
end
|
|
||||||
|
|
||||||
local objectId = ""
|
|
||||||
|
|
||||||
local body = "\nPlease don't delete the information below\n===========\nGameName: Lonely Survivor\n"
|
|
||||||
body = body .. "GameVersion: " .. Platform:getClientVersion() .. "\n"
|
|
||||||
body = body .. "Device Model: " .. DeviceHelper:getDeviceModel() .. "\n"
|
|
||||||
body = body .. "Platform: " .. platform .. "\n"
|
|
||||||
body = body .. "OSversion: " .. DeviceHelper:getOSVersion() .. "\n"
|
|
||||||
body = body .. "User ID: " .. objectId .. "\n"
|
|
||||||
body = body .. "===========\nPlease don't delete the information above"
|
|
||||||
|
|
||||||
local uri = CS.System.Uri("mailto:LonelySurvivorTech@cobbygame.com?subject=" .. subject .. "&body=" .. body)
|
|
||||||
GFunc.openUrl(uri.AbsoluteUri)
|
|
||||||
end)
|
|
||||||
|
|
||||||
local deleteBtn = uiMap["cheating_box.title_bg_img.delete_btn"]
|
|
||||||
|
|
||||||
deleteBtn:addClickListener(function()
|
|
||||||
local sortingOrder = prefabObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS).sortingOrder + 1
|
|
||||||
local obj = ModuleManager.AccountManager:showDeleteUI()
|
|
||||||
obj:setUIOrder(0, sortingOrder)
|
|
||||||
end)
|
|
||||||
|
|
||||||
local showDeleteBtn = true
|
|
||||||
if CheatMessageBox.noDeleteBtn then
|
|
||||||
showDeleteBtn = false
|
|
||||||
end
|
|
||||||
|
|
||||||
deleteBtn:setActive(showDeleteBtn)
|
|
||||||
if showDeleteBtn then
|
|
||||||
okBtn:setAnchoredPositionX(132)
|
|
||||||
else
|
|
||||||
okBtn:setAnchoredPositionX(0)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
function CheatMessageBox:hideCheatMessageBox()
|
|
||||||
if not CheatMessageBox.noDeleteBtn then
|
|
||||||
UIManager:hideCheatMessageBox()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return CheatMessageBox
|
|
||||||
63
lua/app/ui/game_setting/account_delete_ui.lua
Normal file
63
lua/app/ui/game_setting/account_delete_ui.lua
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
local AccountDeleteUI = class("AccountDeleteUI", BaseUI)
|
||||||
|
|
||||||
|
function AccountDeleteUI:isFullScreen()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountDeleteUI:showCommonBG()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountDeleteUI:getPrefabPath()
|
||||||
|
return "assets/prefabs/ui/setting/account_delete_ui.prefab"
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountDeleteUI:onClose()
|
||||||
|
if self.inputFieldObj then
|
||||||
|
self.inputFieldObj:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TMP_INPUT_FIELD).text = GConst.EMPTY_STRING
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountDeleteUI:ctor()
|
||||||
|
self.besureTxStr = I18N:getGlobalText(I18N.GlobalConst.BESURE_DELETE_ACCOUNT_DESC)
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountDeleteUI:onLoadRootComplete()
|
||||||
|
local uiMap = self.root:genAllChildren()
|
||||||
|
self.okBtn = uiMap["account_delete_ui.title_bg_img.change_btn"]
|
||||||
|
self.btnTx = uiMap["account_delete_ui.title_bg_img.change_btn.text"]
|
||||||
|
self.okBtnGray = uiMap["account_delete_ui.title_bg_img.change_btn.gray"]
|
||||||
|
self.inputFieldObj = uiMap["account_delete_ui.title_bg_img.input_field"]
|
||||||
|
|
||||||
|
self.okBtn:addClickListener(function()
|
||||||
|
local content = self.inputFieldObj:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TMP_INPUT_FIELD).text
|
||||||
|
if content == self.besureTxStr then
|
||||||
|
ModuleManager.AccountManager:deleteAccount()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
uiMap["account_delete_ui.title_bg_img.close_btn"]:addClickListener(function()
|
||||||
|
self:closeUI()
|
||||||
|
end)
|
||||||
|
|
||||||
|
self:_display()
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountDeleteUI:_display()
|
||||||
|
local uiMap = self.root:genAllChildren()
|
||||||
|
uiMap["account_delete_ui.title_bg_img.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.MESSAGE_BOX_TITLE))
|
||||||
|
uiMap["account_delete_ui.title_bg_img.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.BESURE_DELETE_TIPS_DESC, self.besureTxStr))
|
||||||
|
|
||||||
|
self:refreshBtn(true)
|
||||||
|
self.inputFieldObj:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TMP_INPUT_FIELD).onValueChanged:AddListener(function(content)
|
||||||
|
self:refreshBtn(content ~= self.besureTxStr)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function AccountDeleteUI:refreshBtn(gray)
|
||||||
|
self.okBtnGray:setVisible(gray)
|
||||||
|
self.okBtn:setTouchEnable(not gray)
|
||||||
|
self.btnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK))
|
||||||
|
end
|
||||||
|
|
||||||
|
return AccountDeleteUI
|
||||||
10
lua/app/ui/game_setting/account_delete_ui.lua.meta
Normal file
10
lua/app/ui/game_setting/account_delete_ui.lua.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2dba9e1bf395ae54584347a571d14188
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||||
@ -62,6 +62,7 @@ function GameSettingUI:initLoginBtn()
|
|||||||
local deleteTx = self.uiMap["game_setting_ui.bg.delete_tx"]
|
local deleteTx = self.uiMap["game_setting_ui.bg.delete_tx"]
|
||||||
deleteTx:setText(I18N:getGlobalText(I18N.GlobalConst.DELETE_ACCOUNT_DESC))
|
deleteTx:setText(I18N:getGlobalText(I18N.GlobalConst.DELETE_ACCOUNT_DESC))
|
||||||
deleteTx:addClickListener(function()
|
deleteTx:addClickListener(function()
|
||||||
|
ModuleManager.AccountManager:showDeleteUI()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -139,8 +139,10 @@ function MainCityUI:_addListeners()
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.bottomBtnSpines[GConst.MainCityConst.BOTTOM_PAGE.SHOP]:playAnimComplete("born", false, false, function()
|
self.bottomBtnSpines[GConst.MainCityConst.BOTTOM_PAGE.SHOP]:playAnimComplete("born1", false, false, function()
|
||||||
self.bottomBtnSpines[GConst.MainCityConst.BOTTOM_PAGE.SHOP]:playAnim("idle", false, false)
|
self.bottomBtnSpines[GConst.MainCityConst.BOTTOM_PAGE.SHOP]:playAnimComplete("born2", false, false, function()
|
||||||
|
self.bottomBtnSpines[GConst.MainCityConst.BOTTOM_PAGE.SHOP]:playAnim("idle", false, false)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
self:refreshBottom(GConst.MainCityConst.BOTTOM_PAGE.SHOP, true)
|
self:refreshBottom(GConst.MainCityConst.BOTTOM_PAGE.SHOP, true)
|
||||||
if self.subComps and self.subComps[GConst.MainCityConst.BOTTOM_PAGE.SHOP] then
|
if self.subComps and self.subComps[GConst.MainCityConst.BOTTOM_PAGE.SHOP] then
|
||||||
@ -261,8 +263,10 @@ function MainCityUI:initBottomUI()
|
|||||||
BIReport:postHomeBtnCilck(BIReport.CLICK_BTN_TYPE[MainCityUI.CLICK_BTN_TYPE[i]])
|
BIReport:postHomeBtnCilck(BIReport.CLICK_BTN_TYPE[MainCityUI.CLICK_BTN_TYPE[i]])
|
||||||
end
|
end
|
||||||
|
|
||||||
self.bottomBtnSpines[i]:playAnimComplete("born", false, false, function()
|
self.bottomBtnSpines[i]:playAnimComplete("born1", false, false, function()
|
||||||
self.bottomBtnSpines[i]:playAnim("idle", false, false)
|
self.bottomBtnSpines[i]:playAnimComplete("born2", false, false, function()
|
||||||
|
self.bottomBtnSpines[i]:playAnim("idle", false, false)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
self:refreshBottom(i, true)
|
self:refreshBottom(i, true)
|
||||||
end)
|
end)
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
local UIManager = {}
|
local UIManager = {}
|
||||||
|
|
||||||
local MESSAGE_BOX_PATH = "assets/prefabs/ui/common/message_box.prefab"
|
local MESSAGE_BOX_PATH = "assets/prefabs/ui/common/message_box.prefab"
|
||||||
local CHEATING_BOX_PATH = "assets/prefabs/ui/common/cheating_box.prefab"
|
|
||||||
local TUTORIAL_PATH = "assets/prefabs/ui/tutorial/tutorial_ui.prefab"
|
local TUTORIAL_PATH = "assets/prefabs/ui/tutorial/tutorial_ui.prefab"
|
||||||
|
|
||||||
UIManager.UI_TYPE = {
|
UIManager.UI_TYPE = {
|
||||||
@ -405,7 +404,6 @@ end
|
|||||||
-- 显示引导节点
|
-- 显示引导节点
|
||||||
function UIManager:showTutorial()
|
function UIManager:showTutorial()
|
||||||
self.tutorialCanvas:setActive(true)
|
self.tutorialCanvas:setActive(true)
|
||||||
self:hideChatBtn()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 隐藏引导节点
|
-- 隐藏引导节点
|
||||||
@ -577,9 +575,6 @@ function UIManager:addLoadUICompleteListener(uiIndex, callback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function UIManager:getMessageBox(top, callback)
|
function UIManager:getMessageBox(top, callback)
|
||||||
if self.cheatMsgBox and self.cheatMsgBox:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS).enabled then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if top then
|
if top then
|
||||||
if self.topMsgBox == nil then
|
if self.topMsgBox == nil then
|
||||||
UIPrefabManager:loadUIWidgetAsync(MESSAGE_BOX_PATH, self.messageBoxNode, function (prefabObject)
|
UIPrefabManager:loadUIWidgetAsync(MESSAGE_BOX_PATH, self.messageBoxNode, function (prefabObject)
|
||||||
@ -621,36 +616,6 @@ function UIManager:getMessageBox(top, callback)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIManager:getCheatMessageBox(callback)
|
|
||||||
if self.topMsgBox then
|
|
||||||
self.topMsgBox:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS).enabled = false
|
|
||||||
end
|
|
||||||
if self.messageBox then
|
|
||||||
self.messageBox:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS).enabled = false
|
|
||||||
end
|
|
||||||
if self.cheatMsgBox == nil then
|
|
||||||
UIPrefabManager:loadUIWidgetAsync(CHEATING_BOX_PATH, self.messageBoxNode, function (prefabObject)
|
|
||||||
if self.cheatMsgBox then
|
|
||||||
prefabObject:destroy()
|
|
||||||
callback(self.cheatMsgBox)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
prefabObject:initPrefabHelper()
|
|
||||||
prefabObject:getTransform():SetAsLastSibling()
|
|
||||||
|
|
||||||
local messageBoxCanvas = prefabObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS)
|
|
||||||
local messageBoxCanvasOrder = UI_MAX_ORDER + UI_INTERVAL_ORDER*OTHER_CANVAS_INTERVAL_ORDER.MESSAGE_BOX_TOP + 1
|
|
||||||
messageBoxCanvas.overrideSorting = true
|
|
||||||
messageBoxCanvas.sortingOrder = messageBoxCanvasOrder
|
|
||||||
self.cheatMsgBox = prefabObject
|
|
||||||
callback(self.cheatMsgBox)
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
self.cheatMsgBox:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS).enabled = true
|
|
||||||
callback(self.cheatMsgBox)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function UIManager:getMessageBoxGameObject(top)
|
function UIManager:getMessageBoxGameObject(top)
|
||||||
if top then
|
if top then
|
||||||
return self.topMsgBox
|
return self.topMsgBox
|
||||||
@ -669,12 +634,6 @@ function UIManager:hideMessageBox()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIManager:hideCheatMessageBox()
|
|
||||||
if self.cheatMsgBox then
|
|
||||||
self.cheatMsgBox:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS).enabled = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function UIManager:hideMessageBoxByTag(tag)
|
function UIManager:hideMessageBoxByTag(tag)
|
||||||
if self.messageBox then
|
if self.messageBox then
|
||||||
if self.messageBox:getTag() == tag then
|
if self.messageBox:getTag() == tag then
|
||||||
@ -972,23 +931,14 @@ function UIManager:showNotchScreen()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIManager:backToLogin(clearLoginType)
|
function UIManager:backToLogin()
|
||||||
self:stopCurrentBGM()
|
self:stopCurrentBGM()
|
||||||
|
SDKManager:logout()
|
||||||
SDKManager:gameLogout(clearLoginType or false, function ()
|
-- 清除引导
|
||||||
-- 移除
|
ModuleManager.TutorialManager:stopTutorial()
|
||||||
-- SchedulerManager:removeCrossDaySId()
|
self:closeAllUI()
|
||||||
|
ModuleManager.BattleManager:clearOnExitScene()
|
||||||
-- 清除引导
|
Game:showLoginUI()
|
||||||
ModuleManager.TutorialManager:stopTutorial()
|
|
||||||
-- 触发断线回到Login界面事件
|
|
||||||
-- EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.LOGOUT_BACK_TO_LOGIN)
|
|
||||||
|
|
||||||
self:closeAllUI()
|
|
||||||
ModuleManager.BattleManager:clearOnExitScene()
|
|
||||||
self:hideChatBtn()
|
|
||||||
Game:showLoginUI()
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIManager:backToLoginWithoutLogout()
|
function UIManager:backToLoginWithoutLogout()
|
||||||
@ -997,7 +947,6 @@ function UIManager:backToLoginWithoutLogout()
|
|||||||
|
|
||||||
self:closeAllUI()
|
self:closeAllUI()
|
||||||
ModuleManager.BattleManager:clearOnExitScene()
|
ModuleManager.BattleManager:clearOnExitScene()
|
||||||
self:hideChatBtn()
|
|
||||||
Game:showLoginUI()
|
Game:showLoginUI()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -33,14 +33,6 @@ function DailyChallengeData:onGetedTaskReward(idx)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DailyChallengeData:clear()
|
function DailyChallengeData:clear()
|
||||||
self.maxWave = nil
|
|
||||||
self.fixedChapterId = nil
|
|
||||||
self.chapterDailyId = nil
|
|
||||||
self.tasks = nil
|
|
||||||
self.buffIds = nil
|
|
||||||
self.totalFightCount = nil
|
|
||||||
self.todayFightCount = nil
|
|
||||||
self.initDay = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyChallengeData:isOpen()
|
function DailyChallengeData:isOpen()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user