Merge branch 'dev' of http://git.juzugame.com/b6-client/b6-lua into dev
This commit is contained in:
commit
63b03dba2a
@ -259,6 +259,11 @@ function BaseObject:addPosition(x, y, z)
|
|||||||
transform.position = Vector3
|
transform.position = Vector3
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BaseObject:getPosition()
|
||||||
|
local transform = self:getTransform()
|
||||||
|
return transform.position
|
||||||
|
end
|
||||||
|
|
||||||
function BaseObject:getLocalPosition()
|
function BaseObject:getLocalPosition()
|
||||||
local transform = self:getTransform()
|
local transform = self:getTransform()
|
||||||
return transform.localPosition
|
return transform.localPosition
|
||||||
|
|||||||
@ -101,6 +101,7 @@ function DataManager:clear()
|
|||||||
-- 任务数据最后清理
|
-- 任务数据最后清理
|
||||||
self.TaskData:clear()
|
self.TaskData:clear()
|
||||||
ModuleManager.TaskManager:clear()
|
ModuleManager.TaskManager:clear()
|
||||||
|
self:clearTryOpenFunc()
|
||||||
end
|
end
|
||||||
|
|
||||||
function DataManager:initWithServerData(data)
|
function DataManager:initWithServerData(data)
|
||||||
@ -255,6 +256,44 @@ function DataManager:scheduleGlobal()
|
|||||||
end, 1)
|
end, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function DataManager:tryOpenModules()
|
||||||
|
if not self.tryOpenCallbacks then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for k, v in pairs(self.tryOpenCallbacks) do
|
||||||
|
v()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function DataManager:registerTryOpenFunc(bindId, func)
|
||||||
|
if not bindId or not func then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not self.tryOpenCallbacks then
|
||||||
|
self.tryOpenCallbacks = {}
|
||||||
|
end
|
||||||
|
self.tryOpenCallbacks[bindId] = func
|
||||||
|
end
|
||||||
|
|
||||||
|
function DataManager:unregisterTryOpenFunc(bindId)
|
||||||
|
if not bindId then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not self.tryOpenCallbacks then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.tryOpenCallbacks[bindId] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function DataManager:clearTryOpenFunc()
|
||||||
|
if not self.tryOpenCallbacks then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for k, v in pairs(self.tryOpenCallbacks) do
|
||||||
|
self.tryOpenCallbacks[k] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function DataManager:getSignInfo()
|
function DataManager:getSignInfo()
|
||||||
local nowTime = Time:getServerTime()
|
local nowTime = Time:getServerTime()
|
||||||
local lastSignTime = self.signInfo.latest_at // 1000
|
local lastSignTime = self.signInfo.latest_at // 1000
|
||||||
|
|||||||
@ -194,6 +194,17 @@ local LocalizationGlobalConst =
|
|||||||
NO_ADS = "NO_ADS",
|
NO_ADS = "NO_ADS",
|
||||||
BESURE_DELETE_TIPS_DESC = "BESURE_DELETE_TIPS_DESC",
|
BESURE_DELETE_TIPS_DESC = "BESURE_DELETE_TIPS_DESC",
|
||||||
BESURE_DELETE_ACCOUNT_DESC = "BESURE_DELETE_ACCOUNT_DESC",
|
BESURE_DELETE_ACCOUNT_DESC = "BESURE_DELETE_ACCOUNT_DESC",
|
||||||
|
DELETE_ACCOUNT_FAILED = "DELETE_ACCOUNT_FAILED",
|
||||||
|
CHANGE_ACCOUNT_TIPS_DESC = "CHANGE_ACCOUNT_TIPS_DESC",
|
||||||
|
BIND_ACCOUNT_SUCCESS = "BIND_ACCOUNT_SUCCESS",
|
||||||
|
MAINTAIN = "MAINTAIN",
|
||||||
|
DISCONNECT_RELOGIN = "DISCONNECT_RELOGIN",
|
||||||
|
FORBIDDEN = "FORBIDDEN",
|
||||||
|
OTHER_LOGIN = "OTHER_LOGIN",
|
||||||
|
ACCOUNT_EXCHANGE_DESC = "ACCOUNT_EXCHANGE_DESC",
|
||||||
|
ALREADY_BINDED_DESC = "ALREADY_BINDED_DESC",
|
||||||
|
BIND_ACCOUNT_FAILED = "BIND_ACCOUNT_FAILED",
|
||||||
|
CHANGE_ACCOUNT_FAILED = "CHANGE_ACCOUNT_FAILED",
|
||||||
}
|
}
|
||||||
|
|
||||||
return LocalizationGlobalConst
|
return LocalizationGlobalConst
|
||||||
@ -207,7 +207,12 @@ local skill = {
|
|||||||
["shake_type"]=5,
|
["shake_type"]=5,
|
||||||
["sound_hit"]=1200120,
|
["sound_hit"]=1200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300022
|
["fx_self"]=300022,
|
||||||
|
["bullet_time"]={
|
||||||
|
1167,
|
||||||
|
3000,
|
||||||
|
300
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[1200121]={
|
[1200121]={
|
||||||
["position"]=1,
|
["position"]=1,
|
||||||
@ -409,7 +414,12 @@ local skill = {
|
|||||||
["shake_type"]=5,
|
["shake_type"]=5,
|
||||||
["sound_hit"]=1200120,
|
["sound_hit"]=1200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300059
|
["fx_self"]=300059,
|
||||||
|
["bullet_time"]={
|
||||||
|
1900,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[1300121]={
|
[1300121]={
|
||||||
["position"]=1,
|
["position"]=1,
|
||||||
@ -495,7 +505,12 @@ local skill = {
|
|||||||
["shake_type"]=5,
|
["shake_type"]=5,
|
||||||
["sound_hit"]=1200120,
|
["sound_hit"]=1200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300059
|
["fx_self"]=300059,
|
||||||
|
["bullet_time"]={
|
||||||
|
1900,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[1300124]={
|
[1300124]={
|
||||||
["position"]=1,
|
["position"]=1,
|
||||||
@ -703,7 +718,12 @@ local skill = {
|
|||||||
["shake_type"]=5,
|
["shake_type"]=5,
|
||||||
["sound_hit"]=1200114,
|
["sound_hit"]=1200114,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300039
|
["fx_self"]=300039,
|
||||||
|
["bullet_time"]={
|
||||||
|
1500,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[1300221]={
|
[1300221]={
|
||||||
["position"]=1,
|
["position"]=1,
|
||||||
@ -806,7 +826,12 @@ local skill = {
|
|||||||
["shake_type"]=5,
|
["shake_type"]=5,
|
||||||
["sound_hit"]=1200114,
|
["sound_hit"]=1200114,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300039
|
["fx_self"]=300039,
|
||||||
|
["bullet_time"]={
|
||||||
|
1500,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[1400110]={
|
[1400110]={
|
||||||
["position"]=1,
|
["position"]=1,
|
||||||
@ -929,7 +954,12 @@ local skill = {
|
|||||||
["shake_type"]=5,
|
["shake_type"]=5,
|
||||||
["sound_hit"]=1200120,
|
["sound_hit"]=1200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300049
|
["fx_self"]=300049,
|
||||||
|
["bullet_time"]={
|
||||||
|
400,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[1400121]={
|
[1400121]={
|
||||||
["position"]=1,
|
["position"]=1,
|
||||||
@ -1131,7 +1161,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300009,
|
["fx_self"]=300009,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
933,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -1218,7 +1248,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300009,
|
["fx_self"]=300009,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
933,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -1352,7 +1382,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300044,
|
["fx_self"]=300044,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1400,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -1420,7 +1450,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300044,
|
["fx_self"]=300044,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1400,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -1649,7 +1679,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300054,
|
["fx_self"]=300054,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
800,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -2100,7 +2130,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300004,
|
["fx_self"]=300004,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1566,
|
966,
|
||||||
5000,
|
5000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -2506,7 +2536,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300074,
|
["fx_self"]=300074,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1500,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -2604,7 +2634,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300074,
|
["fx_self"]=300074,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1500,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -2689,7 +2719,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300074,
|
["fx_self"]=300074,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1500,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -2825,7 +2855,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300092,
|
["fx_self"]=300092,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1600,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -2947,7 +2977,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300092,
|
["fx_self"]=300092,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1600,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -3061,7 +3091,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_target"]=300014
|
["fx_target"]=300014,
|
||||||
|
["bullet_time"]={
|
||||||
|
1066,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[4200121]={
|
[4200121]={
|
||||||
["position"]=4,
|
["position"]=4,
|
||||||
@ -3248,7 +3283,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300084
|
["fx_self"]=300084,
|
||||||
|
["bullet_time"]={
|
||||||
|
200,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[4300121]={
|
[4300121]={
|
||||||
["position"]=4,
|
["position"]=4,
|
||||||
@ -3366,7 +3406,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300084
|
["fx_self"]=300084,
|
||||||
|
["bullet_time"]={
|
||||||
|
200,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[4300210]={
|
[4300210]={
|
||||||
["position"]=4,
|
["position"]=4,
|
||||||
@ -3497,7 +3542,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300079
|
["fx_self"]=300079,
|
||||||
|
["bullet_time"]={
|
||||||
|
1833,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[4300221]={
|
[4300221]={
|
||||||
["position"]=4,
|
["position"]=4,
|
||||||
@ -3706,7 +3756,7 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_target"]=300034,
|
["fx_target"]=300034,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
733,
|
633,
|
||||||
3000,
|
3000,
|
||||||
400
|
400
|
||||||
}
|
}
|
||||||
@ -4068,7 +4118,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300064
|
["fx_self"]=300064,
|
||||||
|
["bullet_time"]={
|
||||||
|
2066,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[5300121]={
|
[5300121]={
|
||||||
["position"]=5,
|
["position"]=5,
|
||||||
@ -4267,7 +4322,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300069
|
["fx_self"]=300069,
|
||||||
|
["bullet_time"]={
|
||||||
|
1133,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[5300221]={
|
[5300221]={
|
||||||
["position"]=5,
|
["position"]=5,
|
||||||
@ -4409,7 +4469,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300069
|
["fx_self"]=300069,
|
||||||
|
["bullet_time"]={
|
||||||
|
1133,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[5400110]={
|
[5400110]={
|
||||||
["position"]=5,
|
["position"]=5,
|
||||||
@ -4531,7 +4596,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300089
|
["fx_self"]=300089,
|
||||||
|
["bullet_time"]={
|
||||||
|
1800,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[5400121]={
|
[5400121]={
|
||||||
["skill_type"]=11,
|
["skill_type"]=11,
|
||||||
@ -4593,7 +4663,12 @@ local skill = {
|
|||||||
["shake_type"]=6,
|
["shake_type"]=6,
|
||||||
["sound_hit"]=4200120,
|
["sound_hit"]=4200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=300089
|
["fx_self"]=300089,
|
||||||
|
["bullet_time"]={
|
||||||
|
1800,
|
||||||
|
3000,
|
||||||
|
400
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[5400124]={
|
[5400124]={
|
||||||
["effect_type"]=2,
|
["effect_type"]=2,
|
||||||
@ -4879,9 +4954,9 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=200045,
|
["fx_self"]=200045,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
333,
|
500,
|
||||||
3000,
|
3000,
|
||||||
666
|
400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10017]={
|
[10017]={
|
||||||
@ -4911,9 +4986,9 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=200037,
|
["fx_self"]=200037,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
333,
|
1500,
|
||||||
3000,
|
3000,
|
||||||
666
|
400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10018]={
|
[10018]={
|
||||||
@ -4948,9 +5023,9 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=200117,
|
["fx_self"]=200117,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
333,
|
400,
|
||||||
3000,
|
3000,
|
||||||
666
|
400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10019]={
|
[10019]={
|
||||||
@ -4980,9 +5055,9 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=200002,
|
["fx_self"]=200002,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
333,
|
666,
|
||||||
3000,
|
3000,
|
||||||
666
|
400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10020]={
|
[10020]={
|
||||||
@ -5012,9 +5087,9 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=200005,
|
["fx_self"]=200005,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
333,
|
666,
|
||||||
3000,
|
3000,
|
||||||
666
|
400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10021]={
|
[10021]={
|
||||||
@ -5044,9 +5119,9 @@ local skill = {
|
|||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=400044,
|
["fx_self"]=400044,
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
333,
|
200,
|
||||||
3000,
|
3000,
|
||||||
666
|
400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[10022]={
|
[10022]={
|
||||||
@ -5371,7 +5446,7 @@ local skill = {
|
|||||||
["trigger"]=1,
|
["trigger"]=1,
|
||||||
["effect"]={
|
["effect"]={
|
||||||
{
|
{
|
||||||
["type"]="shield_rebound_200",
|
["type"]="shield",
|
||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["ratio"]=10000,
|
["ratio"]=10000,
|
||||||
["round"]=2
|
["round"]=2
|
||||||
@ -5578,8 +5653,6 @@ local skill = {
|
|||||||
["sound_hit"]=1200120,
|
["sound_hit"]=1200120,
|
||||||
["name_act"]="skill01",
|
["name_act"]="skill01",
|
||||||
["fx_self"]=200028,
|
["fx_self"]=200028,
|
||||||
["fx_target"]=2,
|
|
||||||
["fx_target_delay"]=900,
|
|
||||||
["bullet_time"]={
|
["bullet_time"]={
|
||||||
1100,
|
1100,
|
||||||
3000,
|
3000,
|
||||||
|
|||||||
@ -194,6 +194,17 @@ local localization_global =
|
|||||||
["NO_ADS"] = "新广告还没有准备好",
|
["NO_ADS"] = "新广告还没有准备好",
|
||||||
["BESURE_DELETE_TIPS_DESC"] = "是否要删除账号,删除后将清除所有信息和内容,账号重新登陆后将是初始1级新手状态。如果确定请输入“{0}”",
|
["BESURE_DELETE_TIPS_DESC"] = "是否要删除账号,删除后将清除所有信息和内容,账号重新登陆后将是初始1级新手状态。如果确定请输入“{0}”",
|
||||||
["BESURE_DELETE_ACCOUNT_DESC"] = "确认删除",
|
["BESURE_DELETE_ACCOUNT_DESC"] = "确认删除",
|
||||||
|
["DELETE_ACCOUNT_FAILED"] = "账号删除失败,请重试",
|
||||||
|
["CHANGE_ACCOUNT_TIPS_DESC"] = "当前账号未绑定, 切换后可能会导致数据丢失, 是否确认要切换?",
|
||||||
|
["BIND_ACCOUNT_SUCCESS"] = "账号绑定成功",
|
||||||
|
["MAINTAIN"] = "服务器维护",
|
||||||
|
["DISCONNECT_RELOGIN"] = "网络连接已断开, 请重新登录",
|
||||||
|
["FORBIDDEN"] = "封号/禁止登录",
|
||||||
|
["OTHER_LOGIN"] = "账号在其他设备登录",
|
||||||
|
["ACCOUNT_EXCHANGE_DESC"] = "账号是没有信息的新号,无法切换。",
|
||||||
|
["ALREADY_BINDED_DESC"] = "绑定失败,该账号已有其他绑定信息",
|
||||||
|
["BIND_ACCOUNT_FAILED"] = "账号绑定失败,请重试",
|
||||||
|
["CHANGE_ACCOUNT_FAILED"] = "账号切换失败,请重试",
|
||||||
}
|
}
|
||||||
|
|
||||||
return localization_global
|
return localization_global
|
||||||
@ -57,14 +57,14 @@ function AccountManager:bindAccount()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function AccountManager:onBindAccount(result)
|
function AccountManager:onBindAccount(result)
|
||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
if result.status == 0 then
|
||||||
local accountInfo = LocalData:getAccountInfo()
|
local accountInfo = LocalData:getAccountInfo()
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
if Platform:isIosPlatform() then
|
if Platform:isIosPlatform() then
|
||||||
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
||||||
accountInfo.apple_id = result.reqData.id
|
accountInfo.apple_id = result.reqData.id
|
||||||
else
|
else
|
||||||
accountInfo.googld_id = result.reqData.id
|
accountInfo.google_id = result.reqData.id
|
||||||
end
|
end
|
||||||
LocalData:setLastLoginInfo(loginType, result.reqData.id, result.reqData.token)
|
LocalData:setLastLoginInfo(loginType, result.reqData.id, result.reqData.token)
|
||||||
LocalData:setAccountInfo(accountInfo)
|
LocalData:setAccountInfo(accountInfo)
|
||||||
@ -73,7 +73,17 @@ function AccountManager:onBindAccount(result)
|
|||||||
BIReport:postAccountBindFinish(loginType, true)
|
BIReport:postAccountBindFinish(loginType, true)
|
||||||
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.BIND_ACCOUNT_SUCCESS))
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.BIND_ACCOUNT_SUCCESS))
|
||||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BIND_ACCOUNT_SUCCESS)
|
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.BIND_ACCOUNT_SUCCESS)
|
||||||
else -- 一些失败的提示
|
else
|
||||||
|
local params = {
|
||||||
|
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK,
|
||||||
|
okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK),
|
||||||
|
}
|
||||||
|
if result.status == 13 then -- 重复绑定
|
||||||
|
params.content = I18N:getGlobalText(I18N.GlobalConst.ALREADY_BINDED_DESC)
|
||||||
|
else
|
||||||
|
params.content = I18N:getGlobalText(I18N.GlobalConst.BIND_ACCOUNT_FAILED)
|
||||||
|
end
|
||||||
|
GFunc.showMessageBox(params)
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
if Platform:isIosPlatform() then
|
if Platform:isIosPlatform() then
|
||||||
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
||||||
@ -103,14 +113,14 @@ function AccountManager:changeAccount()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function AccountManager:onChangeAccount(result)
|
function AccountManager:onChangeAccount(result)
|
||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then -- 目标账号存在,切换到目标账号
|
if result.status == 0 then
|
||||||
local accountInfo = LocalData:getAccountInfo()
|
local accountInfo = LocalData:getAccountInfo()
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
if Platform:isIosPlatform() then
|
if Platform:isIosPlatform() then
|
||||||
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
||||||
accountInfo.apple_id = result.reqData.id
|
accountInfo.apple_id = result.reqData.id
|
||||||
else
|
else
|
||||||
accountInfo.googld_id = result.reqData.id
|
accountInfo.google_id = result.reqData.id
|
||||||
end
|
end
|
||||||
LocalData:setLastLoginInfo(loginType, result.reqData.id, result.reqData.token)
|
LocalData:setLastLoginInfo(loginType, result.reqData.id, result.reqData.token)
|
||||||
LocalData:setAccountInfo(accountInfo)
|
LocalData:setAccountInfo(accountInfo)
|
||||||
@ -118,6 +128,16 @@ function AccountManager:onChangeAccount(result)
|
|||||||
BIReport:postAccountChangeFinish(loginType, true)
|
BIReport:postAccountChangeFinish(loginType, true)
|
||||||
ModuleManager.LoginManager:goToLoginScene()
|
ModuleManager.LoginManager:goToLoginScene()
|
||||||
else
|
else
|
||||||
|
local params = {
|
||||||
|
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK,
|
||||||
|
okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK),
|
||||||
|
}
|
||||||
|
if result.status == 14 then
|
||||||
|
params.content = I18N:getGlobalText(I18N.GlobalConst.ACCOUNT_EXCHANGE_DESC)
|
||||||
|
else
|
||||||
|
params.content = I18N:getGlobalText(I18N.GlobalConst.CHANGE_ACCOUNT_FAILED)
|
||||||
|
end
|
||||||
|
GFunc.showMessageBox(params)
|
||||||
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
local loginType = SDKManager.BF_LOGIN_TYPE.GOOGLE
|
||||||
if Platform:isIosPlatform() then
|
if Platform:isIosPlatform() then
|
||||||
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
loginType = SDKManager.BF_LOGIN_TYPE.APPLE
|
||||||
|
|||||||
@ -119,6 +119,8 @@ function ChapterManager:endFightFinish(result)
|
|||||||
if maxChapter == 1 then
|
if maxChapter == 1 then
|
||||||
DataManager.ShopData:markPopUpGiftForBeginnerGift()
|
DataManager.ShopData:markPopUpGiftForBeginnerGift()
|
||||||
end
|
end
|
||||||
|
-- 新章节通关,尝试解锁新功能
|
||||||
|
DataManager:tryOpenModules()
|
||||||
-- 章节通关 标记可弹出章节礼包
|
-- 章节通关 标记可弹出章节礼包
|
||||||
DataManager.ShopData:markPopUpGiftForActChapterStore(maxChapter)
|
DataManager.ShopData:markPopUpGiftForActChapterStore(maxChapter)
|
||||||
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_PASS_CHAPTER)
|
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_PASS_CHAPTER)
|
||||||
|
|||||||
@ -98,6 +98,12 @@ args:不掉落的元素类型
|
|||||||
Example: set_seal_element 1 2 3]],
|
Example: set_seal_element 1 2 3]],
|
||||||
type = "set_seal_element"
|
type = "set_seal_element"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title = "账号解绑",
|
||||||
|
desc = [[账号解绑 type:unbind
|
||||||
|
Example: unbind google]],
|
||||||
|
type = "unbind"
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return GMConst
|
return GMConst
|
||||||
@ -26,7 +26,13 @@ function MaincityManager:firstEnterMainCity()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MaincityManager:changeMainCityLeftSideBarOpenOrClose()
|
function MaincityManager:changeMainCityLeftSideBarOpenOrClose()
|
||||||
|
local mainUI = UIManager:getUIByIndex(UIManager.UI_PATH.MAINCITY_UI)
|
||||||
|
if not mainUI then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
self.isLeftSideBarClose = not self.isLeftSideBarClose
|
self.isLeftSideBarClose = not self.isLeftSideBarClose
|
||||||
|
mainUI:refreshLeftBtns()
|
||||||
end
|
end
|
||||||
|
|
||||||
function MaincityManager:getIsMainCityLeftSideBarClose()
|
function MaincityManager:getIsMainCityLeftSideBarClose()
|
||||||
@ -34,11 +40,62 @@ function MaincityManager:getIsMainCityLeftSideBarClose()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MaincityManager:changeMainCityRightSideBarOpenOrClose()
|
function MaincityManager:changeMainCityRightSideBarOpenOrClose()
|
||||||
|
local mainUI = UIManager:getUIByIndex(UIManager.UI_PATH.MAINCITY_UI)
|
||||||
|
if not mainUI then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
self.isRightSideBarClose = not self.isRightSideBarClose
|
self.isRightSideBarClose = not self.isRightSideBarClose
|
||||||
|
mainUI:refreshRightBtns()
|
||||||
end
|
end
|
||||||
|
|
||||||
function MaincityManager:getIsMainCityRightSideBarClose()
|
function MaincityManager:getIsMainCityRightSideBarClose()
|
||||||
return self.isRightSideBarClose
|
return self.isRightSideBarClose
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 获取主界面各个模块的入口坐标
|
||||||
|
function MaincityManager:getModuleEntrancePos(moduleKey)
|
||||||
|
local mainUI = UIManager:getUIByIndex(UIManager.UI_PATH.MAINCITY_UI)
|
||||||
|
if not mainUI then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if moduleKey == ModuleManager.MODULE_KEY.TASK then
|
||||||
|
return mainUI:getTaskIconPos()
|
||||||
|
elseif moduleKey == ModuleManager.MODULE_KEY.MALL_DAILY then
|
||||||
|
return mainUI:getMallIconPos()
|
||||||
|
elseif moduleKey == ModuleManager.MODULE_KEY.DAILY_CHALLENGE then
|
||||||
|
return mainUI:getDailyChallengeIconPos()
|
||||||
|
elseif moduleKey == ModuleManager.MODULE_KEY.FUND or
|
||||||
|
moduleKey == ModuleManager.MODULE_KEY.IDLE_DROP or
|
||||||
|
moduleKey == ModuleManager.MODULE_KEY.SEVEN_DAY then
|
||||||
|
return mainUI:getSideBarActIconPos(moduleKey)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 模块在侧边栏,-1:左,0:不在侧边栏,1:右
|
||||||
|
function MaincityManager:getModuleInSideBarWhere(moduleKey)
|
||||||
|
local mainUI = UIManager:getUIByIndex(UIManager.UI_PATH.MAINCITY_UI)
|
||||||
|
if not mainUI then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if mainUI:isInSideBarLeft(moduleKey) then
|
||||||
|
return -1
|
||||||
|
elseif mainUI:isInSideBarRight(moduleKey) then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MaincityManager:isActivSideBarModule(moduleKey)
|
||||||
|
local mainUI = UIManager:getUIByIndex(UIManager.UI_PATH.MAINCITY_UI)
|
||||||
|
if not mainUI then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
return mainUI:isActivSideBarModule(moduleKey)
|
||||||
|
end
|
||||||
|
|
||||||
return MaincityManager
|
return MaincityManager
|
||||||
@ -20,6 +20,7 @@ function PlayerManager:onLevelUpFinish(result)
|
|||||||
if diffLv > 0 then
|
if diffLv > 0 then
|
||||||
self:showPlayerUpUI(currLv, result.rewards)
|
self:showPlayerUpUI(currLv, result.rewards)
|
||||||
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_PLAYER_LV_REACH, diffLv)
|
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_PLAYER_LV_REACH, diffLv)
|
||||||
|
DataManager:tryOpenModules()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -5,6 +5,12 @@ local DEFAULT_RED_POINT_POS_Y = 30
|
|||||||
local DEFAULT_RED_POINT_SCALE = 0.6
|
local DEFAULT_RED_POINT_SCALE = 0.6
|
||||||
|
|
||||||
-- 需要继承重写的部分 ***********************************************************
|
-- 需要继承重写的部分 ***********************************************************
|
||||||
|
|
||||||
|
-- 模块key值,对应ModuleManager.MODULE_KEY
|
||||||
|
function SideBarBaseCellComp:getModuleKey()
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarBaseCellComp:getIsOpen()
|
function SideBarBaseCellComp:getIsOpen()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -19,6 +25,16 @@ function SideBarBaseCellComp:getSpineName()
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 图标动画资源默认名称
|
||||||
|
function SideBarBaseCellComp:getSpineAnimationName()
|
||||||
|
return "idle"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 图标动画默认位置
|
||||||
|
function SideBarBaseCellComp:getSpinePositionY()
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
-- 特效资源路径,为空时不显示
|
-- 特效资源路径,为空时不显示
|
||||||
function SideBarBaseCellComp:getVfxRes()
|
function SideBarBaseCellComp:getVfxRes()
|
||||||
return nil
|
return nil
|
||||||
@ -67,10 +83,11 @@ function SideBarBaseCellComp:refreshSpine()
|
|||||||
self.spine:getSkeletonGraphic().enabled = false
|
self.spine:getSkeletonGraphic().enabled = false
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
self.spine:setAnchoredPositionY(self:getSpinePositionY())
|
||||||
if not self.isInitSpine then
|
if not self.isInitSpine then
|
||||||
self.isInitSpine = true
|
self.isInitSpine = true
|
||||||
self.spine:loadAssetAsync(self:getSpineName(), function()
|
self.spine:loadAssetAsync(self:getSpineName(), function()
|
||||||
self.spine:playAnim("idle", true, true, true)
|
self.spine:playAnim(self:getSpineAnimationName(), true, true, true)
|
||||||
if self.isActive then
|
if self.isActive then
|
||||||
self.spine:setActive(true)
|
self.spine:setActive(true)
|
||||||
else
|
else
|
||||||
@ -142,6 +159,19 @@ function SideBarBaseCellComp:setVisible(visible)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SideBarBaseCellComp:getIsVisible()
|
||||||
|
return self.visible
|
||||||
|
end
|
||||||
|
|
||||||
|
function SideBarBaseCellComp:getEntrancePos()
|
||||||
|
if self:getIconRes() then
|
||||||
|
return self.icon:getPosition()
|
||||||
|
elseif self:getSpineName() then
|
||||||
|
return self.spine:getPosition()
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarBaseCellComp:getCellPath()
|
function SideBarBaseCellComp:getCellPath()
|
||||||
return self.cellPath
|
return self.cellPath
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,12 +1,16 @@
|
|||||||
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
||||||
local SideBarBeginnerGiftCell = class("SideBarBeginnerGiftCell", SideBarBaseCellComp)
|
local SideBarBeginnerGiftCell = class("SideBarBeginnerGiftCell", SideBarBaseCellComp)
|
||||||
|
|
||||||
|
function SideBarBeginnerGiftCell:getModuleKey()
|
||||||
|
return ModuleManager.MODULE_KEY.BEGINNER_GIFT
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarBeginnerGiftCell:getIsOpen()
|
function SideBarBeginnerGiftCell:getIsOpen()
|
||||||
return DataManager.ShopData:getBeginnerGiftShowSideBar()
|
return DataManager.ShopData:getBeginnerGiftShowSideBar()
|
||||||
end
|
end
|
||||||
|
|
||||||
function SideBarBeginnerGiftCell:getIconRes()
|
function SideBarBeginnerGiftCell:getSpineName()
|
||||||
return "main_btn_gift_1"
|
return "main_btn_gift_new"
|
||||||
end
|
end
|
||||||
|
|
||||||
function SideBarBeginnerGiftCell:onClick()
|
function SideBarBeginnerGiftCell:onClick()
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
||||||
local SideBarFirstRechargeCell = class("SideBarFirstRechargeCell", SideBarBaseCellComp)
|
local SideBarFirstRechargeCell = class("SideBarFirstRechargeCell", SideBarBaseCellComp)
|
||||||
|
|
||||||
|
function SideBarFirstRechargeCell:getModuleKey()
|
||||||
|
return ModuleManager.MODULE_KEY.FIRST_RECHARGE
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarFirstRechargeCell:getIsOpen()
|
function SideBarFirstRechargeCell:getIsOpen()
|
||||||
return DataManager.ShopData:getShowFirstRechargeSideBar()
|
return DataManager.ShopData:getShowFirstRechargeSideBar()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
||||||
local SideBarGoldPigCell = class("SideBarGoldPigCell", SideBarBaseCellComp)
|
local SideBarGoldPigCell = class("SideBarGoldPigCell", SideBarBaseCellComp)
|
||||||
|
|
||||||
|
function SideBarGoldPigCell:getModuleKey()
|
||||||
|
return ModuleManager.MODULE_KEY.GOLD_PIG
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarGoldPigCell:getIsOpen()
|
function SideBarGoldPigCell:getIsOpen()
|
||||||
return DataManager.GoldPigData:getIsOpen()
|
return DataManager.GoldPigData:getIsOpen()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -5,8 +5,8 @@ function SideBarGrowUpGift1Cell:getIsOpen()
|
|||||||
return #DataManager.ShopData:getValidGrowUpGifts() >= 1
|
return #DataManager.ShopData:getValidGrowUpGifts() >= 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function SideBarGrowUpGift1Cell:getIconRes()
|
function SideBarGrowUpGift1Cell:getSpineName()
|
||||||
return "main_btn_gift_2"
|
return "ui_main_btn_gift_grow"
|
||||||
end
|
end
|
||||||
|
|
||||||
function SideBarGrowUpGift1Cell:onClick()
|
function SideBarGrowUpGift1Cell:onClick()
|
||||||
|
|||||||
@ -5,8 +5,8 @@ function SideBarGrowUpGift2Cell:getIsOpen()
|
|||||||
return #DataManager.ShopData:getValidGrowUpGifts() >= 2
|
return #DataManager.ShopData:getValidGrowUpGifts() >= 2
|
||||||
end
|
end
|
||||||
|
|
||||||
function SideBarGrowUpGift2Cell:getIconRes()
|
function SideBarGrowUpGift2Cell:getSpineName()
|
||||||
return "main_btn_gift_2"
|
return "ui_main_btn_gift_grow"
|
||||||
end
|
end
|
||||||
|
|
||||||
function SideBarGrowUpGift2Cell:onClick()
|
function SideBarGrowUpGift2Cell:onClick()
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
||||||
local SideBarGrowthFundCell = class("SideBarGrowthFundCell", SideBarBaseCellComp)
|
local SideBarGrowthFundCell = class("SideBarGrowthFundCell", SideBarBaseCellComp)
|
||||||
|
|
||||||
|
function SideBarGrowthFundCell:getModuleKey()
|
||||||
|
return ModuleManager.MODULE_KEY.FUND
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarGrowthFundCell:getIsOpen()
|
function SideBarGrowthFundCell:getIsOpen()
|
||||||
return DataManager.GrowthFundData:getIsOpen()
|
return DataManager.GrowthFundData:getIsOpen()
|
||||||
end
|
end
|
||||||
@ -9,6 +13,10 @@ function SideBarGrowthFundCell:getSpineName()
|
|||||||
return "ui_main_btn_growup"
|
return "ui_main_btn_growup"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SideBarGrowthFundCell:getSpinePositionY()
|
||||||
|
return -50 -- 临时资源
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarGrowthFundCell:onClick()
|
function SideBarGrowthFundCell:onClick()
|
||||||
ModuleManager.FundManager:showLevelFundUI()
|
ModuleManager.FundManager:showLevelFundUI()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
||||||
local SideBarIdleCell = class("SideBarIdleCell", SideBarBaseCellComp)
|
local SideBarIdleCell = class("SideBarIdleCell", SideBarBaseCellComp)
|
||||||
|
|
||||||
|
function SideBarIdleCell:getModuleKey()
|
||||||
|
return ModuleManager.MODULE_KEY.IDLE_DROP
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarIdleCell:getIsOpen()
|
function SideBarIdleCell:getIsOpen()
|
||||||
return DataManager.IdleData:getIsOpen()
|
return DataManager.IdleData:getIsOpen()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
||||||
local SideBarSevenDaysCell = class("SideBarSevenDaysCell", SideBarBaseCellComp)
|
local SideBarSevenDaysCell = class("SideBarSevenDaysCell", SideBarBaseCellComp)
|
||||||
|
|
||||||
|
function SideBarSevenDaysCell:getModuleKey()
|
||||||
|
return ModuleManager.MODULE_KEY.SEVEN_DAY
|
||||||
|
end
|
||||||
|
|
||||||
function SideBarSevenDaysCell:getIsOpen()
|
function SideBarSevenDaysCell:getIsOpen()
|
||||||
return DataManager.SevenDayData:getIsOpen()
|
return DataManager.SevenDayData:getIsOpen()
|
||||||
end
|
end
|
||||||
|
|||||||
@ -71,8 +71,10 @@ function MainComp:refreshFightBtn()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function MainComp:refreshLeftBtn()
|
function MainComp:refreshLeftBtn()
|
||||||
local leftBtn = self.uiMap["main_comp.left_btn"]
|
if self.leftBtn == nil then
|
||||||
leftBtn:setActive(false)
|
self.leftBtn = self.uiMap["main_comp.left_btn"]
|
||||||
|
end
|
||||||
|
self.leftBtn:setActive(false)
|
||||||
|
|
||||||
local leftIdx = self:getCurLeftModuleIdx()
|
local leftIdx = self:getCurLeftModuleIdx()
|
||||||
if leftIdx == nil then
|
if leftIdx == nil then
|
||||||
@ -83,23 +85,25 @@ function MainComp:refreshLeftBtn()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
leftBtn:setActive(true)
|
self.leftBtn:setActive(true)
|
||||||
local iconAtlas, iconName = moduleCell:getEntranceIcon()
|
local iconAtlas, iconName = moduleCell:getEntranceIcon()
|
||||||
self.uiMap["main_comp.left_btn.desc"]:setText(moduleCell:getEntranceName())
|
self.uiMap["main_comp.left_btn.desc"]:setText(moduleCell:getEntranceName())
|
||||||
self.uiMap["main_comp.left_btn.icon"]:setSprite(iconAtlas, iconName)
|
self.uiMap["main_comp.left_btn.icon"]:setSprite(iconAtlas, iconName)
|
||||||
leftBtn:addClickListener(function()
|
self.leftBtn:addClickListener(function()
|
||||||
self:refreshModule(leftIdx)
|
self:refreshModule(leftIdx)
|
||||||
end)
|
end)
|
||||||
if moduleCell:getShowEntranceRedPoint() then
|
if moduleCell:getShowEntranceRedPoint() then
|
||||||
leftBtn:addRedPoint(65, 35, 0.6)
|
self.leftBtn:addRedPoint(65, 35, 0.6)
|
||||||
else
|
else
|
||||||
leftBtn:removeRedPoint()
|
self.leftBtn:removeRedPoint()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainComp:refreshRightBtn()
|
function MainComp:refreshRightBtn()
|
||||||
local rightBtn = self.uiMap["main_comp.right_btn"]
|
if self.rightBtn == nil then
|
||||||
rightBtn:setActive(false)
|
self.rightBtn = self.uiMap["main_comp.right_btn"]
|
||||||
|
end
|
||||||
|
self.rightBtn:setActive(false)
|
||||||
|
|
||||||
local rightIdx = self:getCurRightModuleIdx()
|
local rightIdx = self:getCurRightModuleIdx()
|
||||||
if rightIdx == nil then
|
if rightIdx == nil then
|
||||||
@ -110,17 +114,17 @@ function MainComp:refreshRightBtn()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
rightBtn:setActive(true)
|
self.rightBtn:setActive(true)
|
||||||
local iconAtlas, iconName = moduleCell:getEntranceIcon()
|
local iconAtlas, iconName = moduleCell:getEntranceIcon()
|
||||||
self.uiMap["main_comp.right_btn.desc"]:setText(moduleCell:getEntranceName())
|
self.uiMap["main_comp.right_btn.desc"]:setText(moduleCell:getEntranceName())
|
||||||
self.uiMap["main_comp.right_btn.icon"]:setSprite(iconAtlas, iconName)
|
self.uiMap["main_comp.right_btn.icon"]:setSprite(iconAtlas, iconName)
|
||||||
rightBtn:addClickListener(function()
|
self.rightBtn:addClickListener(function()
|
||||||
self:refreshModule(rightIdx)
|
self:refreshModule(rightIdx)
|
||||||
end)
|
end)
|
||||||
if moduleCell:getShowEntranceRedPoint() then
|
if moduleCell:getShowEntranceRedPoint() then
|
||||||
rightBtn:addRedPoint(-65, 35, 0.6)
|
self.rightBtn:addRedPoint(-65, 35, 0.6)
|
||||||
else
|
else
|
||||||
rightBtn:removeRedPoint()
|
self.rightBtn:removeRedPoint()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -188,4 +192,13 @@ function MainComp:refreshStageFormaion()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function MainComp:getDailyChallengeIconPos()
|
||||||
|
if self:getCurLeftModuleIdx() == GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE then
|
||||||
|
return self.leftBtn:getPosition()
|
||||||
|
end
|
||||||
|
if self:getCurRightModuleIdx() == GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE then
|
||||||
|
return self.rightBtn:getPosition()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return MainComp
|
return MainComp
|
||||||
@ -403,7 +403,6 @@ end
|
|||||||
|
|
||||||
function MainCityUI:openOrCloseLeftSideBar()
|
function MainCityUI:openOrCloseLeftSideBar()
|
||||||
ModuleManager.MaincityManager:changeMainCityLeftSideBarOpenOrClose()
|
ModuleManager.MaincityManager:changeMainCityLeftSideBarOpenOrClose()
|
||||||
self:refreshLeftBtns()
|
|
||||||
if self.isShowLeftSideBarArrowRedPoint ~= nil then
|
if self.isShowLeftSideBarArrowRedPoint ~= nil then
|
||||||
local isShowLeftSideBarArrowRedPoint = self.isShowLeftSideBarArrowRedPoint
|
local isShowLeftSideBarArrowRedPoint = self.isShowLeftSideBarArrowRedPoint
|
||||||
self.isShowLeftSideBarArrowRedPoint = nil
|
self.isShowLeftSideBarArrowRedPoint = nil
|
||||||
@ -470,7 +469,6 @@ end
|
|||||||
|
|
||||||
function MainCityUI:openOrCloseRightSideBar()
|
function MainCityUI:openOrCloseRightSideBar()
|
||||||
ModuleManager.MaincityManager:changeMainCityRightSideBarOpenOrClose()
|
ModuleManager.MaincityManager:changeMainCityRightSideBarOpenOrClose()
|
||||||
self:refreshRightBtns()
|
|
||||||
if self.isShowRightSideBarArrowRedPoint ~= nil then
|
if self.isShowRightSideBarArrowRedPoint ~= nil then
|
||||||
local isShowRightSideBarArrowRedPoint = self.isShowRightSideBarArrowRedPoint
|
local isShowRightSideBarArrowRedPoint = self.isShowRightSideBarArrowRedPoint
|
||||||
self.isShowRightSideBarArrowRedPoint = nil
|
self.isShowRightSideBarArrowRedPoint = nil
|
||||||
@ -969,4 +967,63 @@ function MainCityUI:checkGift()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function MainCityUI:getTaskIconPos()
|
||||||
|
return self.taskBtn:getPosition()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainCityUI:getMallIconPos()
|
||||||
|
return self.bottomBtnSpines[GConst.MainCityConst.BOTTOM_PAGE.SHOP]:getPosition()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainCityUI:getDailyChallengeIconPos()
|
||||||
|
return self.subComps[GConst.MainCityConst.BOTTOM_PAGE.MAIN]:getDailyChallengeIconPos()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainCityUI:getSideBarActIconPos(moduleKey)
|
||||||
|
for name, cell in pairs(self.leftBarList) do
|
||||||
|
if moduleKey == cell:getModuleKey() then
|
||||||
|
return cell:getBaseObject():getPosition()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for name, cell in pairs(self.rightBarList) do
|
||||||
|
if moduleKey == cell:getModuleKey() then
|
||||||
|
return cell:getBaseObject():getPosition()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainCityUI:isInSideBarLeft(moduleKey)
|
||||||
|
for name, cell in pairs(self.leftBarList) do
|
||||||
|
if moduleKey == cell:getModuleKey() then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainCityUI:isInSideBarRight(moduleKey)
|
||||||
|
for name, cell in pairs(self.rightBarList) do
|
||||||
|
if moduleKey == cell:getModuleKey() then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainCityUI:isActivSideBarModule(moduleKey)
|
||||||
|
for name, cell in pairs(self.leftBarList) do
|
||||||
|
if moduleKey == cell:getModuleKey() then
|
||||||
|
return cell:getIsActive() and cell:getIsVisible()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for name, cell in pairs(self.rightBarList) do
|
||||||
|
if moduleKey == cell:getModuleKey() then
|
||||||
|
return cell:getIsActive() and cell:getIsVisible()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
return MainCityUI
|
return MainCityUI
|
||||||
@ -29,54 +29,114 @@ end
|
|||||||
|
|
||||||
function ModuleUnlockUI:onLoadRootComplete()
|
function ModuleUnlockUI:onLoadRootComplete()
|
||||||
self.uiMap = self.root:genAllChildren()
|
self.uiMap = self.root:genAllChildren()
|
||||||
self.uiMap["module_unlock_ui.bg"]:addClickListener(function()
|
|
||||||
self:showNextModuleUnlockAnimation()
|
|
||||||
end)
|
|
||||||
|
|
||||||
self.moduleNameTx = self.uiMap["module_unlock_ui.name_tx"]
|
self.bg = self.uiMap["module_unlock_ui.bg"]
|
||||||
self.moduleIcon = self.uiMap["module_unlock_ui.icon"]
|
self.bg:addClickListener(function()
|
||||||
self.uiMap["module_unlock_ui.continue"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE))
|
if not self.canClick then
|
||||||
self.uiMap["module_unlock_ui.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.FUNC_UNLOCK))
|
return
|
||||||
|
|
||||||
self:showModuleUnlockAnimation()
|
|
||||||
end
|
|
||||||
|
|
||||||
function ModuleUnlockUI:showNextModuleUnlockAnimation()
|
|
||||||
if self:showModuleUnlockAnimation() then
|
|
||||||
self:playUnlockAnimation()
|
|
||||||
end
|
end
|
||||||
|
self:showModuleUnlockVanishAnim()
|
||||||
|
end)
|
||||||
|
self.moduleNameTx = self.uiMap["module_unlock_ui.bg.name_tx"]
|
||||||
|
self.moduleIcon = self.uiMap["module_unlock_ui.icon"]
|
||||||
|
self.titleTx = self.uiMap["module_unlock_ui.bg.spine_title.title_tx"]
|
||||||
|
self.spineTitle = self.uiMap["module_unlock_ui.bg.spine_title"]
|
||||||
|
self.spineCircle = self.uiMap["module_unlock_ui.icon.spine_circle"]
|
||||||
|
self.spineStar = self.uiMap["module_unlock_ui.spine_star"]
|
||||||
|
self.uiMap["module_unlock_ui.bg.continue"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE))
|
||||||
|
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.FUNC_UNLOCK))
|
||||||
|
|
||||||
|
self.initIconPos = self.uiMap["module_unlock_ui.init_pos"]:getPosition()
|
||||||
|
self.canvasGroupBg = self.bg:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
||||||
|
self.canvasGroupTitleTx = self.titleTx:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
||||||
|
self.canvasGroupIcon = self.moduleIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
|
||||||
|
|
||||||
|
self:checkShowNext()
|
||||||
end
|
end
|
||||||
|
|
||||||
function ModuleUnlockUI:showModuleUnlockAnimation()
|
-- 检查是否展示
|
||||||
|
function ModuleUnlockUI:checkShowNext()
|
||||||
if #self.unlockList <= 0 then
|
if #self.unlockList <= 0 then
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
return false
|
return
|
||||||
end
|
end
|
||||||
local moduleKey = table.remove(self.unlockList, 1)
|
self.moduleKey = table.remove(self.unlockList, 1)
|
||||||
local info = ConfigManager:getConfig("func_open")[moduleKey]
|
local info = ConfigManager:getConfig("func_open")[self.moduleKey]
|
||||||
local i18nInfo = I18N:getConfig("func_open")[moduleKey]
|
local i18nInfo = I18N:getConfig("func_open")[self.moduleKey]
|
||||||
if info == nil or i18nInfo == nil then
|
if info == nil or i18nInfo == nil then
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
return false
|
return
|
||||||
end
|
end
|
||||||
self.moduleNameTx:setText(i18nInfo.name)
|
self.moduleNameTx:setText(i18nInfo.name)
|
||||||
if info.icon then
|
if info.icon then
|
||||||
self.moduleIcon:setSprite(GConst.ATLAS_PATH.MODULE, info.icon)
|
self.moduleIcon:setSprite(GConst.ATLAS_PATH.MODULE, info.icon)
|
||||||
end
|
end
|
||||||
return true
|
|
||||||
|
-- 侧边栏功能,检查处理侧边栏打开
|
||||||
|
if not ModuleManager.MaincityManager:isActivSideBarModule(self.moduleKey) then
|
||||||
|
if ModuleManager.MaincityManager:getModuleInSideBarWhere(self.moduleKey) == -1 then
|
||||||
|
ModuleManager.MaincityManager:changeMainCityLeftSideBarOpenOrClose()
|
||||||
|
elseif ModuleManager.MaincityManager:getModuleInSideBarWhere(self.moduleKey) == 1 then
|
||||||
|
ModuleManager.MaincityManager:changeMainCityRightSideBarOpenOrClose()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self:showModuleUnlockAppearAnim()
|
||||||
end
|
end
|
||||||
|
|
||||||
function ModuleUnlockUI:playUnlockAnimation()
|
-- 出现
|
||||||
if self.unlockAnimationSeq == nil then
|
function ModuleUnlockUI:showModuleUnlockAppearAnim()
|
||||||
self.unlockAnimationSeq = self.root:createBindTweenSequence()
|
self.canClick = false
|
||||||
local scaleTween1 = self.root:getTransform():DOScale(1.05, 0.15)
|
self.canvasGroupBg.alpha = 0
|
||||||
self.unlockAnimationSeq:Append(scaleTween1)
|
self.canvasGroupTitleTx.alpha = 0
|
||||||
|
self.canvasGroupIcon.alpha = 0
|
||||||
|
self.titleTx:setLocalScale(0,0,0)
|
||||||
|
self.moduleIcon:setLocalScale(1,1,1)
|
||||||
|
self.moduleIcon:setPosition(self.initIconPos.x, self.initIconPos.y, self.initIconPos.z)
|
||||||
|
|
||||||
local scaleTween2 = self.root:getTransform():DOScale(1, 0.2)
|
self.spineTitle:playAnim("idle", false, true, true)
|
||||||
self.unlockAnimationSeq:Append(scaleTween2)
|
self:performWithDelayGlobal(function()
|
||||||
self.unlockAnimationSeq:SetAutoKill(false)
|
self.spineCircle:playAnim("idle", false, true, true)
|
||||||
|
end, 0.17)
|
||||||
|
if self.animAppear == nil then
|
||||||
|
self.animAppear = self.root:createBindTweenSequence()
|
||||||
|
self.animAppear:Insert(0, self.canvasGroupBg:DOFade(1, 0.14))
|
||||||
|
self.animAppear:Insert(0.13, self.canvasGroupIcon:DOFade(1, 0.07))
|
||||||
|
self.animAppear:Insert(0.13, self.moduleIcon:getTransform():DOScale(1.2, 0.07))
|
||||||
|
self.animAppear:Insert(0.17, self.canvasGroupTitleTx:DOFade(1, 0.1))
|
||||||
|
self.animAppear:Insert(0.17, self.titleTx:getTransform():DOScale(1.2, 0.1))
|
||||||
|
self.animAppear:Insert(0.2, self.moduleIcon:getTransform():DOScale(1, 0.13))
|
||||||
|
self.animAppear:SetAutoKill(false)
|
||||||
|
self.animAppear:OnComplete(function()
|
||||||
|
self.canClick = true
|
||||||
|
end)
|
||||||
else
|
else
|
||||||
self.unlockAnimationSeq:Restart()
|
self.animAppear:Restart()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 消失
|
||||||
|
function ModuleUnlockUI:showModuleUnlockVanishAnim()
|
||||||
|
self.canClick = false
|
||||||
|
self.animVanish = self.root:createBindTweenSequence()
|
||||||
|
self.animVanish:Insert(0, self.canvasGroupBg:DOFade(0, 0.1))
|
||||||
|
self.animVanish:Insert(0, self.titleTx:getTransform():DOScale(1, 0.16))
|
||||||
|
self.animVanish:Insert(0, self.moduleIcon:getTransform():DOScale(0.46, 0.1))
|
||||||
|
self.animVanish:Insert(0.33, self.canvasGroupIcon:DOFade(0, 0.07))
|
||||||
|
local targetPos = ModuleManager.MaincityManager:getModuleEntrancePos(self.moduleKey)
|
||||||
|
if targetPos then
|
||||||
|
self.spineStar:setPosition(targetPos.x, targetPos.y, targetPos.z)
|
||||||
|
self.animVanish:Insert(0.17, self.moduleIcon:getTransform():DOMove(CS.UnityEngine.Vector3(targetPos.x, targetPos.y, targetPos.z), 0.16))
|
||||||
|
self.animVanish:OnComplete(function()
|
||||||
|
self.animVanish = nil
|
||||||
|
self.spineStar:playAnimComplete("idle", false, true, function()
|
||||||
|
self:checkShowNext()
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
self.animVanish:OnComplete(function()
|
||||||
|
self.animVanish = nil
|
||||||
|
self:checkShowNext()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
local ActivityData = class("ActivityData", BaseData)
|
local ActivityData = class("ActivityData", BaseData)
|
||||||
|
|
||||||
function ActivityData:init(data)
|
function ActivityData:init(data)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return ActivityData
|
return ActivityData
|
||||||
@ -13,6 +13,7 @@ function SevenDayData:clear()
|
|||||||
self.tasks = {}
|
self.tasks = {}
|
||||||
self.stepRewards = {}
|
self.stepRewards = {}
|
||||||
DataManager:unregisterCrossDayFunc("SevenDayData")
|
DataManager:unregisterCrossDayFunc("SevenDayData")
|
||||||
|
DataManager:unregisterTryOpenFunc("SevenDayData")
|
||||||
end
|
end
|
||||||
|
|
||||||
function SevenDayData:init(data)
|
function SevenDayData:init(data)
|
||||||
@ -35,6 +36,19 @@ function SevenDayData:init(data)
|
|||||||
self:calCollectStepCount()
|
self:calCollectStepCount()
|
||||||
self:initTaskListener()
|
self:initTaskListener()
|
||||||
|
|
||||||
|
if self.openTs <= 0 then
|
||||||
|
DataManager:registerTryOpenFunc("SevenDayData", function()
|
||||||
|
if self.openTs <= 0 then
|
||||||
|
if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then
|
||||||
|
self.openTs = Time:getBeginningOfServerToday()
|
||||||
|
self.endTime = self.openTs + self:getDurationTime()
|
||||||
|
self.actDay = 1
|
||||||
|
DataManager:unregisterTryOpenFunc("SevenDayData")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
DataManager:registerCrossDayFunc("SevenDayData", function()
|
DataManager:registerCrossDayFunc("SevenDayData", function()
|
||||||
self.actDay = self.actDay + 1
|
self.actDay = self.actDay + 1
|
||||||
self:setDirty()
|
self:setDirty()
|
||||||
@ -361,7 +375,7 @@ end
|
|||||||
function SevenDayData:initTaskListener()
|
function SevenDayData:initTaskListener()
|
||||||
local nowTime = Time:getServerTime()
|
local nowTime = Time:getServerTime()
|
||||||
-- 活动结束就不用监听了
|
-- 活动结束就不用监听了
|
||||||
if self.endTime < nowTime then
|
if self.endTime > 0 and self.endTime < nowTime then
|
||||||
ModuleManager.TaskManager:unRegisterAllModuleTask("SevenDayData")
|
ModuleManager.TaskManager:unRegisterAllModuleTask("SevenDayData")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user