社稷大典代码完善提交v1
parent
1112953786
commit
927cc43b0d
|
|
@ -2369,7 +2369,7 @@ GameObject:
|
|||
- component: {fileID: 822424992725520638}
|
||||
- component: {fileID: 1545715228569344760}
|
||||
m_Layer: 0
|
||||
m_Name: Text (1)
|
||||
m_Name: myScore
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -3338,7 +3338,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8919506895467505745
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -4109,9 +4109,9 @@ RectTransform:
|
|||
m_Father: {fileID: 7828549967971581295}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 75, y: -86.4}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 127, y: 135}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5512448614276019420
|
||||
|
|
@ -5069,6 +5069,86 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &1147134106935048208
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2940051127256586359}
|
||||
- component: {fileID: 117563016031521644}
|
||||
- component: {fileID: 8071470749281742774}
|
||||
m_Layer: 0
|
||||
m_Name: guildScore
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2940051127256586359
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1147134106935048208}
|
||||
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_Children: []
|
||||
m_Father: {fileID: 6438191524765740913}
|
||||
m_RootOrder: 8
|
||||
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: -81.3, y: -90.4}
|
||||
m_SizeDelta: {x: 100, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &117563016031521644
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1147134106935048208}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8071470749281742774
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1147134106935048208}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ebfe0e44da74fbd44b1b744995de2324, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.76470596, b: 0.3921569, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 28
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u5DE5\u4F1A\u79EF\u5206"
|
||||
LanguageIndex: 0
|
||||
--- !u!1 &1175254284194947088
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -7179,7 +7259,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -8291,7 +8371,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -8687,9 +8767,9 @@ RectTransform:
|
|||
m_Father: {fileID: 7828549967971581295}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 75, y: -252.70001}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 123, y: 122}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1732994052915569369
|
||||
|
|
@ -9846,7 +9926,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -10071,6 +10151,7 @@ RectTransform:
|
|||
- {fileID: 4209473502778920143}
|
||||
- {fileID: 2700255070182177948}
|
||||
- {fileID: 630116848201627351}
|
||||
- {fileID: 2940051127256586359}
|
||||
m_Father: {fileID: 7992592756989776200}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -18593,7 +18674,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -19085,7 +19166,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -19671,7 +19752,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -23061,9 +23142,9 @@ RectTransform:
|
|||
m_Father: {fileID: 2293225850057858121}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 666.6666, y: -100}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 220, y: 200}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4078729962362331170
|
||||
|
|
@ -33308,7 +33389,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -33465,9 +33546,9 @@ RectTransform:
|
|||
m_Father: {fileID: 2293225850057858121}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 133.33333, y: -100}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 220, y: 200}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7356654609538196851
|
||||
|
|
@ -38059,7 +38140,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -44403,9 +44484,9 @@ RectTransform:
|
|||
m_Father: {fileID: 2293225850057858121}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -100}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 220, y: 200}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2510522006877764187
|
||||
|
|
@ -50808,11 +50889,6 @@ PrefabInstance:
|
|||
m_Modification:
|
||||
m_TransformParent: {fileID: 4364234898477055512}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8096286917689290514, guid: 385d5e664702ab74aa985d27de27bb19,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Effect_UI_changjing_qiankuanbaoguo
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2626320712165749272, guid: 385d5e664702ab74aa985d27de27bb19,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
|
@ -50868,6 +50944,11 @@ PrefabInstance:
|
|||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8096286917689290514, guid: 385d5e664702ab74aa985d27de27bb19,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Effect_UI_changjing_qiankuanbaoguo
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 385d5e664702ab74aa985d27de27bb19, type: 3}
|
||||
--- !u!4 &5379899409067946649 stripped
|
||||
|
|
|
|||
|
|
@ -1037,6 +1037,7 @@ ActivityTypeDef = {
|
|||
OpenSeverWelfare=55,--开服福利
|
||||
EightDayGift = 56,--八日登陆
|
||||
SignInfo = 57,--三日七日签到
|
||||
Celebration = 60,--主题活动 社稷大典
|
||||
|
||||
--主题活动
|
||||
FindFairy=43,--限时招募
|
||||
|
|
@ -1045,7 +1046,6 @@ ActivityTypeDef = {
|
|||
DynamicAct = 20000,--主题活动任务
|
||||
DynamicAct_TimeLimitShop = 20001,--主题活动限时商市
|
||||
DynamicAct_Treasure = 20002,--主题活动珍奇宝阁
|
||||
DynamicAct_Celebration = 20003,--主题活动 社稷大典
|
||||
|
||||
TreasureStore = 6000,--百宝商会
|
||||
|
||||
|
|
@ -1793,6 +1793,9 @@ RANK_TYPE = {
|
|||
XUANYUANMIRROR_RANK=24,-- 竞技场积分排名 前端自己添加
|
||||
FAST_EXPLORE=25,--极速达人排行
|
||||
GUILDTRANSCRIPT=26,--公会排行
|
||||
|
||||
CELEBRATION_PERSON = 27,--社稷大典个人
|
||||
CELEBRATION_GUILD = 28,--社稷大典工会
|
||||
}
|
||||
|
||||
--东海寻仙弹窗类型
|
||||
|
|
@ -2073,6 +2076,8 @@ rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner04", name = Language[1
|
|||
[9] = { bgImage = "r_zjm_paihangbang_banner01", name = Language[12386] ,rankType = RANK_TYPE.GOLD_EXPER,activiteId = ActivityTypeDef.FindTreasureExper,isRankingMainPanelShow = false},
|
||||
[10] = { bgImage = "r_zjm_paihangbang_banner01", name = Language[12386] ,rankType = RANK_TYPE.GOLD_EXPER,activiteId = ActivityTypeDef.ExpeditionExper,isRankingMainPanelShow = false},
|
||||
[11] = { bgImage = "r_zjm_paihangbang_banner01", name = Language[12167] ,rankType = RANK_TYPE.GOLD_EXPER,activiteId = ActivityTypeDef.DemonSlayer,isRankingMainPanelShow = false},
|
||||
[12] = { bgImage = "r_zjm_paihangbang_banner01", name = Language[11033] ,rankType = RANK_TYPE.CELEBRATION_PERSON,activiteId = ActivityTypeDef.Celebration,isRankingMainPanelShow = false},
|
||||
[13] = { bgImage = "r_zjm_paihangbang_banner01", name = "工会排行" ,rankType = RANK_TYPE.CELEBRATION_GUILD,activiteId = ActivityTypeDef.Celebration,isRankingMainPanelShow = false},
|
||||
}
|
||||
|
||||
SoulPrintSpriteByQuantity={
|
||||
|
|
|
|||
|
|
@ -1151,6 +1151,25 @@ function CalculateSecondsNowTo_N_OClock(n)
|
|||
end
|
||||
end
|
||||
|
||||
function TimeToFelaxible(second)--大于一天用多少天多少小时,小于一天用00:00:00
|
||||
if second <= 86400 then
|
||||
if not second or second < 0 then
|
||||
return "00:00:00"
|
||||
end
|
||||
local _sec = second % 60
|
||||
local allMin = math.floor(second / 60)
|
||||
local _min = allMin % 60
|
||||
local _hour = math.floor(allMin / 60)
|
||||
return string.format("%02d:%02d:%02d", _hour, _min, _sec), _hour, _min, _sec
|
||||
elseif second > 86400 then
|
||||
local day = math.floor(second / (24 * 3600))
|
||||
local minute = math.floor(second / 60) % 60
|
||||
local sec = second % 60
|
||||
local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600)
|
||||
return string.format(Language[12278],day, hour)
|
||||
end
|
||||
|
||||
end
|
||||
--- 将一段时间转换为天时分秒
|
||||
function TimeToDHMS(second)
|
||||
local day = math.floor(second / (24 * 3600))
|
||||
|
|
|
|||
|
|
@ -1,272 +1,192 @@
|
|||
local SheJiDaDian = quick_class("SheJiDaDian")
|
||||
local this = SheJiDaDian
|
||||
local orginLayer = 0
|
||||
local parent
|
||||
local curRankType = RANK_TYPE.CELEBRATION_PERSON
|
||||
local ActInfo={}
|
||||
|
||||
function SheJiDaDian:ctor(mainPanel, gameObject)
|
||||
self.mainPanel = mainPanel.transform
|
||||
self.gameObject = gameObject
|
||||
self:InitComponent(gameObject)
|
||||
self:BindEvent()
|
||||
function this:ctor(mainPanel, gameObject)
|
||||
this.mainPanel = mainPanel.transform
|
||||
this.gameObject = gameObject
|
||||
this:InitComponent(gameObject)
|
||||
this:BindEvent()
|
||||
end
|
||||
|
||||
function SheJiDaDian:InitComponent(gameObject)
|
||||
function this:InitComponent(gameObject)
|
||||
|
||||
-- self.tabList = Util.GetGameObject(self.mainPanel,"bg/tabbox")
|
||||
-- self.btnBack = Util.GetGameObject(self.mainPanel,"bg/btnBack")
|
||||
-- self.bottomBar = Util.GetGameObject(self.mainPanel,"bg/bottomBar")
|
||||
-- --midDown
|
||||
-- self.midDown = Util.GetGameObject(gameObject,"midDown")
|
||||
-- self.midDowntips1 = Util.GetGameObject(self.midDown,"tips/tips1"):GetComponent("Text")
|
||||
-- self.leftUptips1 = Util.GetGameObject(self.midDown,"tips/tips1/times"):GetComponent("Text")
|
||||
-- self.leftUpTime = Util.GetGameObject(self.midDown,"tips/tips2/time"):GetComponent("Text")
|
||||
-- self.btnHelp= Util.GetGameObject(gameObject,"btnHelp")
|
||||
-- self.helpPosition=self.btnHelp:GetComponent("RectTransform").localPosition
|
||||
-- --rightUp
|
||||
-- self.rightUp = Util.GetGameObject(gameObject,"rightUp")
|
||||
-- self.btnReward = Util.GetGameObject(self.rightUp,"reward")
|
||||
-- self.btnStore = Util.GetGameObject(self.rightUp,"store")
|
||||
-- --center
|
||||
-- self.center = Util.GetGameObject(gameObject,"center")
|
||||
-- self.icons = Util.GetGameObject(self.center,"icons")
|
||||
-- --bottom
|
||||
-- self.bottom = Util.GetGameObject(gameObject,"bottom")
|
||||
-- self.btnOne = Util.GetGameObject(self.bottom,"btnOne")
|
||||
-- self.di1 = Util.GetGameObject(self.bottom,"countDown/di1")
|
||||
-- self.btnTime = Util.GetGameObject(self.bottom,"countDown/di1/time"):GetComponent("Text")
|
||||
-- self.btnTen1 = Util.GetGameObject(self.bottom,"btnTen1")
|
||||
-- self.btnTen2 = Util.GetGameObject(self.bottom,"btnTen2")
|
||||
-- self.btnTimes= Util.GetGameObject(self.bottom,"countDown/di2/time"):GetComponent("Text")
|
||||
-- --limit
|
||||
-- self.limit = Util.GetGameObject(gameObject,"limitdi/limit"):GetComponent("Text")
|
||||
-- --detail
|
||||
-- self.detail = Util.GetGameObject(gameObject,"detail")
|
||||
-- --shop
|
||||
-- self.shop = Util.GetGameObject(gameObject,"shop")
|
||||
-- self.shopBack = Util.GetGameObject(self.shop,"shopBack/btnBack")
|
||||
-- self.content = Util.GetGameObject(self.shop,"content")
|
||||
-- self.livename=nil
|
||||
-- self.live = Util.GetGameObject(self.shop,"live")
|
||||
-- self.effect = Util.GetGameObject(self.gameObject, "Effect_UI_changjing_qiankuanbaoguo")
|
||||
--down
|
||||
this.tabList = Util.GetGameObject(this.mainPanel,"bg/tabbox")
|
||||
this.btnBack = Util.GetGameObject(this.mainPanel,"bg/btnBack")
|
||||
this.bottomBar = Util.GetGameObject(this.mainPanel,"bg/bottomBar")
|
||||
--leftUp
|
||||
this.leftUp = Util.GetGameObject(this.mainPanel,"leftUp")
|
||||
this.firstName = Util.GetGameObject(this.leftUp,"text/first"):GetComponent("Text")
|
||||
this.secendName = Util.GetGameObject(this.leftUp,"text/secend"):GetComponent("Text")
|
||||
this.thirdName = Util.GetGameObject(this.leftUp,"text/third"):GetComponent("Text")
|
||||
this.myScoreText = Util.GetGameObject(this.leftUp,"myScore")
|
||||
this.guildScoreText = Util.GetGameObject(this.leftUp,"guildScore")
|
||||
this.score = Util.GetGameObject(this.leftUp,"text/score"):GetComponent("Text")
|
||||
this.btnDetail = Util.GetGameObject(this.leftUp,"btnDetail")
|
||||
this.btnTeamRank = Util.GetGameObject(this.leftUp,"teamRank")
|
||||
this.btnPersonRank = Util.GetGameObject(this.leftUp,"personRank")
|
||||
--rightUp
|
||||
this.btnHelp= Util.GetGameObject(this.gameObject,"btnHelp")
|
||||
this.helpPosition=this.btnHelp:GetComponent("RectTransform").localPosition
|
||||
this.rightUp = Util.GetGameObject(this.gameObject,"rightUp")
|
||||
this.btnStore = Util.GetGameObject(this.rightUp,"store")
|
||||
--center
|
||||
this.centerTime = Util.GetGameObject(this.gameObject,"center/time/num"):GetComponent("Text")
|
||||
--leftTime
|
||||
this.leftTime = Util.GetGameObject(this.gameObject,"limitdi/limit"):GetComponent("Text")
|
||||
--shop
|
||||
this.shop = Util.GetGameObject(this.gameObject,"shop")
|
||||
this.shopBack = Util.GetGameObject(this.shop,"shopBack/btnBack")
|
||||
this.content = Util.GetGameObject(this.shop,"content")
|
||||
this.livename=nil
|
||||
this.live = Util.GetGameObject(this.shop,"live")
|
||||
-- this.effect = Util.GetGameObject(this.gameObject, "Effect_UI_changjing_qiankuanbaoguo")
|
||||
end
|
||||
|
||||
function SheJiDaDian:BindEvent()
|
||||
-- Util.AddClick(self.btnHelp,function()
|
||||
-- UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.QianKunBox,self.helpPosition.x,self.helpPosition.y)
|
||||
-- end)
|
||||
-- Util.AddClick(self.btnReward,function()
|
||||
-- self.effect:SetActive(false)
|
||||
-- ActivityDetail.new(self.detail,2,self.effect)
|
||||
-- end)
|
||||
-- Util.AddClick(self.btnStore,function()
|
||||
-- self.effect:SetActive(false)
|
||||
-- self.shop:SetActive(true)
|
||||
-- self.btnBack:SetActive(false)
|
||||
-- self.tabList:SetActive(false)
|
||||
-- self.bottomBar:SetActive(false)
|
||||
-- self.livename = "live2d_ui_h_52_xx_pf1"
|
||||
-- self.liveNode = poolManager:LoadLive(self.livename, self.live.transform, Vector3.New(0.25,0.25,0.25), Vector3.New(123,214,0))
|
||||
-- self:storeShow()--商店
|
||||
-- end)
|
||||
-- Util.AddClick(self.shopBack,function()
|
||||
-- self.effect:SetActive(true)
|
||||
-- self.shop:SetActive(false)
|
||||
-- self.btnBack:SetActive(true)
|
||||
-- self.tabList:SetActive(true)
|
||||
-- self.bottomBar:SetActive(true)
|
||||
-- poolManager:UnLoadLive(self.livename, self.liveNode)
|
||||
-- self.livename = nil
|
||||
-- end)
|
||||
Util.AddClick(this.btnHelp,function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.QianKunBox,this.helpPosition.x,this.helpPosition.y)
|
||||
end)
|
||||
|
||||
Util.AddClick(this.btnStore,function()
|
||||
-- this.effect:SetActive(false)
|
||||
this.shop:SetActive(true)
|
||||
this.btnBack:SetActive(false)
|
||||
this.tabList:SetActive(false)
|
||||
this.bottomBar:SetActive(false)
|
||||
this.livename = "live2d_ui_h_52_xx_pf1"
|
||||
this.liveNode = poolManager:LoadLive(this.livename, this.live.transform, Vector3.New(0.25,0.25,0.25), Vector3.New(123,214,0))
|
||||
this:StoreShow()--商店
|
||||
end)
|
||||
|
||||
Util.AddClick(this.shopBack,function()
|
||||
-- this.effect:SetActive(true)
|
||||
this.shop:SetActive(false)
|
||||
this.btnBack:SetActive(true)
|
||||
this.tabList:SetActive(true)
|
||||
this.bottomBar:SetActive(true)
|
||||
poolManager:UnLoadLive(this.livename, this.liveNode)
|
||||
this.livename = nil
|
||||
end)
|
||||
|
||||
Util.AddClick(this.btnDetail,function()
|
||||
if curRankType == RANK_TYPE.CELEBRATION_PERSON then--个人排行
|
||||
UIManager.OpenPanel(UIName.RankingSingleListPanel,rankKingList[11])--rankKingList[12])
|
||||
elseif curRankType == RANK_TYPE.CELEBRATION_GUILD then--工会排行
|
||||
UIManager.OpenPanel(UIName.RankingSingleListPanel,rankKingList[11])--rankKingList[13])
|
||||
end
|
||||
end)
|
||||
|
||||
Util.AddClick(this.btnTeamRank,function()
|
||||
curRankType = RANK_TYPE.CELEBRATION_GUILD
|
||||
this:LeftUpShow(ActInfo,curRankType)
|
||||
end)
|
||||
|
||||
Util.AddClick(this.btnPersonRank,function()
|
||||
curRankType = RANK_TYPE.CELEBRATION_PERSON
|
||||
this:LeftUpShow(ActInfo,curRankType)
|
||||
end)
|
||||
end
|
||||
|
||||
function SheJiDaDian:OnShow(sortingOrder,_parent)
|
||||
-- parent = _parent
|
||||
-- Util.AddParticleSortLayer(self.effect, sortingOrder - orginLayer)
|
||||
-- orginLayer = sortingOrder
|
||||
-- activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DynamicAct_Celebration)
|
||||
-- local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
|
||||
-- singleRecruit = array[1]
|
||||
-- tenRecruit = array[2]
|
||||
-- iconsData = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotteryRewardConfig,"Pool",singleRecruit.DiamondBoxContain[1][1])
|
||||
-- self.gameObject:SetActive(true)
|
||||
-- self:refreshMagicNum()
|
||||
-- self:refreshBtnShow()--刷新按钮显示
|
||||
function this:OnShow(sortingOrder,_parent)
|
||||
parent = _parent
|
||||
orginLayer = sortingOrder
|
||||
this:Refresh()
|
||||
end
|
||||
|
||||
-- self:timeCountDown()--时间
|
||||
function this:Refresh()
|
||||
-- local ActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.Celebration)--暂时还没有
|
||||
ActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.DemonSlayer)--暂时还没有
|
||||
-- Util.AddParticleSortLayer(this.effect, sortingOrder - orginLayer)
|
||||
this:TimeCountDown(ActInfo)--时间
|
||||
this:LeftUpShow(ActInfo)
|
||||
|
||||
end
|
||||
|
||||
-- function SheJiDaDian:refreshBtnShow()
|
||||
function this:LeftUpShow(ActInfo,_curRankType)
|
||||
local allRankData,myRankData,rankType
|
||||
if _curRankType then
|
||||
curRankType = _curRankType
|
||||
end
|
||||
|
||||
-- local freeTimesId=lotterySetting[singleRecruit.Id].FreeTimes
|
||||
-- local maxtimesId=lotterySetting[singleRecruit.Id].MaxTimes --lotterySetting表中的MaxTimes对应privilegeConfig表中的id
|
||||
-- local curTimes=PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)
|
||||
-- local freeTime= 0
|
||||
-- self.limit.text = Language[12225]..curTimes.."/"..privilegeConfig[maxtimesId].Condition[1][2]
|
||||
-- self.di1:SetActive(true)
|
||||
-- if freeTimesId>0 then
|
||||
-- freeTime= PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
|
||||
-- RecruitManager.freeUseTimeList[freeTimesId]=freeTime
|
||||
-- end
|
||||
|
||||
-- --按钮赋值
|
||||
-- for n, m in ipairs(btns) do
|
||||
-- local btn=Util.GetGameObject(self.gameObject,m.name)
|
||||
-- local redPot=Util.GetGameObject(btn.gameObject,"redPoint")
|
||||
-- local info=Util.GetGameObject(btn.gameObject,"layout/info"):GetComponent("Text")
|
||||
-- local icon=Util.GetGameObject(btn.gameObject,"layout/icon"):GetComponent("Image")
|
||||
-- local num=Util.GetGameObject(btn.gameObject,"layout/num"):GetComponent("Text")
|
||||
rankType = RANK_TYPE.GOLD_EXPER--测试用之后需要删除的
|
||||
|
||||
-- --存在免费次数 并且 免费>=1 并且是1按钮
|
||||
-- local isFree=freeTime and freeTime >= 1 and n==bType.Btn1
|
||||
-- redPot.gameObject:SetActive(isFree)
|
||||
-- icon.gameObject:SetActive(not isFree)
|
||||
-- num.gameObject:SetActive(not isFree)
|
||||
-- if n==bType.Btn1 and isFree then
|
||||
-- self.di1:SetActive(false)
|
||||
-- end
|
||||
|
||||
this.myScoreText:SetActive(curRankType == RANK_TYPE.CELEBRATION_PERSON)
|
||||
this.guildScoreText:SetActive(curRankType ~= RANK_TYPE.CELEBRATION_PERSON)
|
||||
|
||||
-- local itemId=0
|
||||
-- local itemNum=0
|
||||
-- local type = 0
|
||||
-- if n==bType.Btn1 then
|
||||
-- type = singleRecruit.Id
|
||||
-- else
|
||||
-- type = tenRecruit.Id
|
||||
-- end
|
||||
-- local d=RecruitManager.GetExpendData(type)
|
||||
-- if(isFree) then
|
||||
-- info.text=Language[11759]
|
||||
-- else
|
||||
-- itemId=d[1]
|
||||
-- itemNum=d[2]
|
||||
-- -- LogPink("itemId:"..itemId.." itemNum:"..itemNum)
|
||||
-- icon.sprite=Util.LoadSprite(artResourcesConfig[itemConfig[itemId].ResourceID].Name)
|
||||
-- info.text=m.isInfo
|
||||
-- num.text= tostring(itemNum)
|
||||
-- end
|
||||
RankingManager.InitData(rankType,function ()
|
||||
allRankData,myRankData = RankingManager.GetRankingInfo()
|
||||
|
||||
-- Util.AddOnceClick(btn,function()
|
||||
-- if not isFree then
|
||||
-- if BagManager.GetItemCountById(itemId)<d[2] then
|
||||
-- PopupTipPanel.ShowTip(itemConfig[itemId].Name..Language[10492])
|
||||
-- return
|
||||
-- end
|
||||
-- end
|
||||
-- local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.QianKunBoxTen)
|
||||
-- if n==bType.Btn1 then
|
||||
-- if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+1>privilegeConfig[maxtimesId].Condition[1][2] then
|
||||
-- PopupTipPanel.ShowTip(Language[11760])
|
||||
-- return
|
||||
-- end
|
||||
-- local recruitOne = function()
|
||||
-- RecruitManager.RecruitRequest(singleRecruit.Id, function(msg)
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,1)--记录抽卡次数
|
||||
-- UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel, msg.drop,singleRecruit.Id)
|
||||
-- CheckRedPointStatus(RedPointType.SheJiDaDian)
|
||||
-- end,freeTimesId)
|
||||
-- end
|
||||
-- if state==0 and d[1] ==16 and not isFree then
|
||||
-- UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,singleRecruit.Id,recruitOne)
|
||||
-- else
|
||||
-- recruitOne()
|
||||
-- end
|
||||
-- elseif n==bType.Btn10 then
|
||||
-- if PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)+10>privilegeConfig[maxtimesId].Condition[1][2] then
|
||||
-- PopupTipPanel.ShowTip(Language[11760])
|
||||
-- return
|
||||
-- end
|
||||
-- local recruitTen = function()
|
||||
-- RecruitManager.RecruitRequest(tenRecruit.Id, function(msg)
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(maxtimesId,10)--记录抽卡次数
|
||||
-- UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel, msg.drop,tenRecruit.Id)
|
||||
-- CheckRedPointStatus(RedPointType.SheJiDaDian)
|
||||
-- end,freeTimesId)
|
||||
-- end
|
||||
-- if state==0 and d[1] ==16 and not isFree then
|
||||
-- UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,tenRecruit.Id,recruitTen)
|
||||
-- else
|
||||
-- recruitTen()
|
||||
-- end
|
||||
-- end
|
||||
-- end)
|
||||
-- end
|
||||
-- end
|
||||
this.firstName.text = allRankData[1].userName
|
||||
this.secendName.text = allRankData[2].userName
|
||||
this.thirdName.text = allRankData[3].userName
|
||||
this.score.text = myRankData.rank
|
||||
end,ActInfo.activityId)
|
||||
end
|
||||
|
||||
-- --商店
|
||||
-- function SheJiDaDian:storeShow()
|
||||
-- if not self.shopView then
|
||||
-- self.shopView = SubUIManager.Open(SubUIConfig.ShopView, self.content.transform)
|
||||
-- end
|
||||
-- self.shopView:ShowShop(SHOP_TYPE.QIANKUNBOX_SHOP,orginLayer)
|
||||
-- end
|
||||
--商店
|
||||
function this:StoreShow()
|
||||
if not this.shopView then
|
||||
this.shopView = SubUIManager.Open(SubUIConfig.ShopView, this.content.transform)
|
||||
end
|
||||
this.shopView:ShowShop(SHOP_TYPE.QIANKUNBOX_SHOP,orginLayer)
|
||||
end
|
||||
|
||||
-- --时间
|
||||
-- function SheJiDaDian:timeCountDown()
|
||||
-- local timeDown=CalculateSecondsNowTo_N_OClock(5)--领取按钮的倒计时
|
||||
-- self.btnTime.text = TimeToHMS(timeDown)
|
||||
-- -- self.shopData = ShopManager.GetShopDataByType(SHOP_TYPE.QIANKUNBOX_SHOP)--获取活动信息
|
||||
-- self.shopData =ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.SheJiDaDian)
|
||||
-- self.leftUpTime.text = self:TimeToDHMS(self.shopData.endTime - PlayerManager.serverTime)--活动结束的倒计时
|
||||
-- self.timer = Timer.New(function()
|
||||
-- self.leftUpTime.text = self:TimeToDHMS(self.shopData.endTime - PlayerManager.serverTime)
|
||||
-- self.btnTime.text = TimeToHMS(timeDown)
|
||||
-- if timeDown < 1 then
|
||||
-- self.timer:Stop()
|
||||
-- self.timer = nil
|
||||
-- parent:ClosePanel()
|
||||
-- return
|
||||
-- end
|
||||
-- timeDown = timeDown -1
|
||||
-- end, 1, -1, true)
|
||||
-- self.timer:Start()
|
||||
-- end
|
||||
--时间
|
||||
function this:TimeCountDown(ActInfo)
|
||||
--活动结束时间
|
||||
local actTime = ActInfo.endTime - GetTimeStamp()
|
||||
this.leftTime.text = Language[10028]..TimeToFelaxible(actTime)
|
||||
--宝箱领取重置时间
|
||||
local giftTime=CalculateSecondsNowTo_N_OClock(5)--领取按钮的倒计时
|
||||
this.centerTime.text = TimeToFelaxible(giftTime)
|
||||
|
||||
-- --- 将一段时间转换为天时分秒
|
||||
-- function SheJiDaDian:TimeToDHMS(second)
|
||||
-- local day = math.floor(second / (24 * 3600))
|
||||
-- local minute = math.floor(second / 60) % 60
|
||||
-- local sec = second % 60
|
||||
-- local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600)
|
||||
-- if day <= 0 and hour <= 0 then
|
||||
-- return string.format(Language[12231],minute, sec)
|
||||
-- else
|
||||
-- return string.format(Language[12232],day, hour)
|
||||
-- end
|
||||
-- end
|
||||
this.timer = Timer.New(function()
|
||||
this.leftTime.text = Language[10028]..TimeToFelaxible(actTime)
|
||||
this.centerTime.text = TimeToFelaxible(giftTime)
|
||||
|
||||
-- function SheJiDaDian:refreshMagicNum()
|
||||
-- local actData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.SheJiDaDian)
|
||||
-- local d = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySpecialConfig,"Type",singleRecruit.MergePool)
|
||||
-- self.leftUptips1.text = d[1].Count-math.floor(actData.value/1000)
|
||||
-- self.btnTimes.text = tostring(d[2].Count-actData.value%1000)..Language[12264]
|
||||
-- self.midDowntips1.text = Language[12239]
|
||||
-- end
|
||||
if actTime < 1 then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
parent:ClosePanel()
|
||||
return
|
||||
end
|
||||
if giftTime < 1 then
|
||||
this:Refresh()
|
||||
end
|
||||
actTime = actTime -1
|
||||
giftTime = giftTime - 1
|
||||
end, 1, -1, true)
|
||||
this.timer:Start()
|
||||
end
|
||||
|
||||
function SheJiDaDian:OnSortingOrderChange(_sortingOrder)
|
||||
function this:OnSortingOrderChange(_sortingOrder)
|
||||
orginLayer = _sortingOrder
|
||||
end
|
||||
|
||||
function SheJiDaDian:OnHide()
|
||||
-- self.gameObject:SetActive(false)
|
||||
-- self.detail.gameObject:SetActive(false)
|
||||
-- if self.timer then
|
||||
-- self.timer:Stop()
|
||||
-- self.timer = nil
|
||||
-- end
|
||||
-- if self.shopView then
|
||||
-- self.shopView = SubUIManager.Close(self.shopView)
|
||||
-- self.shopView = nil
|
||||
-- end
|
||||
function this:OnHide()
|
||||
if this.timer then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
end
|
||||
if this.shopView then
|
||||
this.shopView = SubUIManager.Close(this.shopView)
|
||||
this.shopView = nil
|
||||
end
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function SheJiDaDian:AddListener()
|
||||
function this:AddListener()
|
||||
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function SheJiDaDian:RemoveListener()
|
||||
function this:RemoveListener()
|
||||
|
||||
end
|
||||
|
||||
return SheJiDaDian
|
||||
return this
|
||||
Loading…
Reference in New Issue