【家园】提交
parent
b45f74781c
commit
aa761fc4e9
|
@ -2379,6 +2379,143 @@ Animator:
|
||||||
m_HasTransformHierarchy: 1
|
m_HasTransformHierarchy: 1
|
||||||
m_AllowConstantClipSamplingOptimization: 1
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
m_KeepAnimatorControllerStateOnDisable: 0
|
m_KeepAnimatorControllerStateOnDisable: 0
|
||||||
|
--- !u!1 &1045725968128280061
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7253798310191575885}
|
||||||
|
- component: {fileID: 7532574275084512101}
|
||||||
|
- component: {fileID: 7451805036258177225}
|
||||||
|
- component: {fileID: 6460609023339010750}
|
||||||
|
- component: {fileID: 8798839207500120790}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: helpBtn
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &7253798310191575885
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1045725968128280061}
|
||||||
|
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: 8624922088146301509}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 68, y: 68}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &7532574275084512101
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1045725968128280061}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &7451805036258177225
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1045725968128280061}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, 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_Sprite: {fileID: 21300000, guid: 47b0d71d3c8ef79468a5fb4d8ec5f365, type: 3}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
--- !u!114 &6460609023339010750
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1045725968128280061}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 3
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
|
m_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 0}
|
||||||
|
m_PressedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 7451805036258177225}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||||
|
Culture=neutral, PublicKeyToken=null
|
||||||
|
--- !u!95 &8798839207500120790
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1045725968128280061}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 9100000, guid: 6ffe000b5a58aac48a9d130543849d76, type: 2}
|
||||||
|
m_CullingMode: 0
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ApplyRootMotion: 0
|
||||||
|
m_LinearVelocityBlending: 0
|
||||||
|
m_WarningMessage:
|
||||||
|
m_HasTransformHierarchy: 1
|
||||||
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
|
m_KeepAnimatorControllerStateOnDisable: 0
|
||||||
--- !u!1 &1045835768165763114
|
--- !u!1 &1045835768165763114
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -4071,11 +4208,11 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Padding:
|
m_Padding:
|
||||||
m_Left: 0
|
m_Left: 25
|
||||||
m_Right: 0
|
m_Right: 0
|
||||||
m_Top: 70
|
m_Top: 70
|
||||||
m_Bottom: 0
|
m_Bottom: 0
|
||||||
m_ChildAlignment: 1
|
m_ChildAlignment: 0
|
||||||
m_Spacing: 0
|
m_Spacing: 0
|
||||||
m_ChildForceExpandWidth: 0
|
m_ChildForceExpandWidth: 0
|
||||||
m_ChildForceExpandHeight: 0
|
m_ChildForceExpandHeight: 0
|
||||||
|
@ -8184,6 +8321,7 @@ RectTransform:
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children:
|
||||||
|
- {fileID: 7253798310191575885}
|
||||||
- {fileID: 6922651342968358476}
|
- {fileID: 6922651342968358476}
|
||||||
- {fileID: 921226750657908999}
|
- {fileID: 921226750657908999}
|
||||||
m_Father: {fileID: 4324122628603852573}
|
m_Father: {fileID: 4324122628603852573}
|
||||||
|
@ -9208,7 +9346,7 @@ RectTransform:
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 8624922088146301509}
|
m_Father: {fileID: 8624922088146301509}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
@ -9722,7 +9860,7 @@ RectTransform:
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 400, y: 20}
|
m_SizeDelta: {x: 480, y: 20}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &3949078891269079823
|
--- !u!222 &3949078891269079823
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -9757,7 +9895,7 @@ MonoBehaviour:
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
m_FillMethod: 0
|
m_FillMethod: 0
|
||||||
m_FillAmount: 0.48
|
m_FillAmount: 1
|
||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
|
@ -10327,8 +10465,8 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 21, y: 0}
|
m_AnchoredPosition: {x: 61.28, y: 0}
|
||||||
m_SizeDelta: {x: 400, y: 20}
|
m_SizeDelta: {x: 485, y: 25}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7463409761781263111
|
--- !u!222 &7463409761781263111
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -16521,7 +16659,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 250, y: -37.5}
|
m_AnchoredPosition: {x: 275, y: -37.5}
|
||||||
m_SizeDelta: {x: 500, y: 75}
|
m_SizeDelta: {x: 500, y: 75}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &9157575620332401253
|
--- !u!114 &9157575620332401253
|
||||||
|
@ -19485,7 +19623,7 @@ RectTransform:
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 325, y: 0}
|
m_AnchoredPosition: {x: 325, y: 0}
|
||||||
m_SizeDelta: {x: 500, y: 0}
|
m_SizeDelta: {x: 650, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &4252301830560688640
|
--- !u!114 &4252301830560688640
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -19500,11 +19638,11 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Padding:
|
m_Padding:
|
||||||
m_Left: 0
|
m_Left: 25
|
||||||
m_Right: 0
|
m_Right: 0
|
||||||
m_Top: 0
|
m_Top: 0
|
||||||
m_Bottom: 0
|
m_Bottom: 0
|
||||||
m_ChildAlignment: 1
|
m_ChildAlignment: 0
|
||||||
m_Spacing: 0
|
m_Spacing: 0
|
||||||
m_ChildForceExpandWidth: 0
|
m_ChildForceExpandWidth: 0
|
||||||
m_ChildForceExpandHeight: 0
|
m_ChildForceExpandHeight: 0
|
||||||
|
@ -20420,7 +20558,7 @@ RectTransform:
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 8297330754098413395}
|
- {fileID: 8297330754098413395}
|
||||||
m_Father: {fileID: 8624922088146301509}
|
m_Father: {fileID: 8624922088146301509}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
@ -22930,7 +23068,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 325, y: -107.5}
|
m_AnchoredPosition: {x: 275, y: -107.5}
|
||||||
m_SizeDelta: {x: 500, y: 75}
|
m_SizeDelta: {x: 500, y: 75}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &3570726070853778701
|
--- !u!114 &3570726070853778701
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -60,6 +60,7 @@ function this:BindEvent()
|
||||||
NetManager.ArchitectureOperateRequest({data.dataMain.Id},2,0,function ()
|
NetManager.ArchitectureOperateRequest({data.dataMain.Id},2,0,function ()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.UI.OnUpdateData)
|
Game.GlobalEvent:DispatchEvent(GameEvent.UI.OnUpdateData)
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
|
PopupTipPanel.ShowTip(string.format("<color=#00FF00>%s</color>已升级至<color=#00FF00>%s</color>级",data.dataMain.Name,data.dataSingle.level))
|
||||||
end)
|
end)
|
||||||
end,"取消","确定")
|
end,"取消","确定")
|
||||||
|
|
||||||
|
@ -144,9 +145,9 @@ function this:CulculateTime(time)
|
||||||
elseif time >= 60 and time < 3600 then
|
elseif time >= 60 and time < 3600 then
|
||||||
return math.floor(time/60).."分"..(time%60).."秒"
|
return math.floor(time/60).."分"..(time%60).."秒"
|
||||||
elseif time >= 3600 and time < 86400 then
|
elseif time >= 3600 and time < 86400 then
|
||||||
return math.floor(time/3600).."时"..(time%60).."分"
|
return math.floor(time/3600).."时"..math.floor(time/60).."分"
|
||||||
elseif time >= 86400 then
|
elseif time >= 86400 then
|
||||||
return math.floor(time/86400).."天"..(time%3600).."时"
|
return math.floor(time/86400).."天"..math.floor(time/3600).."时"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ function HomeLand:InitComponent()
|
||||||
-- end
|
-- end
|
||||||
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
|
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
|
||||||
self.btnBack = Util.GetGameObject(self.gameObject,"btnBack")
|
self.btnBack = Util.GetGameObject(self.gameObject,"btnBack")
|
||||||
|
|
||||||
self.map = Util.GetGameObject(self.gameObject,"Map")
|
self.map = Util.GetGameObject(self.gameObject,"Map")
|
||||||
self.Grid = Util.GetGameObject(self.map,"Grid")
|
self.Grid = Util.GetGameObject(self.map,"Grid")
|
||||||
self.Bg = Util.GetGameObject(self.map,"Bg")
|
self.Bg = Util.GetGameObject(self.map,"Bg")
|
||||||
|
@ -20,6 +21,8 @@ function HomeLand:InitComponent()
|
||||||
self.RightUp = Util.GetGameObject(self.map,"RightUp")
|
self.RightUp = Util.GetGameObject(self.map,"RightUp")
|
||||||
self.RightDown = Util.GetGameObject(self.map,"RightDown")
|
self.RightDown = Util.GetGameObject(self.map,"RightDown")
|
||||||
|
|
||||||
|
self.helpBtn = Util.GetGameObject(self.RightUp, "helpBtn")
|
||||||
|
self.helpPosition=self.helpBtn:GetComponent("RectTransform").localPosition
|
||||||
--privi
|
--privi
|
||||||
self.priviDi = Util.GetGameObject(self.Privi,"di")
|
self.priviDi = Util.GetGameObject(self.Privi,"di")
|
||||||
self.priviText = Util.GetGameObject(self.Privi,"di/Text"):GetComponent("Text")
|
self.priviText = Util.GetGameObject(self.Privi,"di/Text"):GetComponent("Text")
|
||||||
|
@ -88,6 +91,10 @@ function HomeLand:BindEvent()
|
||||||
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
|
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
|
--帮助按钮
|
||||||
|
Util.AddClick(self.helpBtn, function()
|
||||||
|
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.Practice, self.helpPosition.x,self.helpPosition.y)
|
||||||
|
end)
|
||||||
Util.AddClick(self.Bg, function()
|
Util.AddClick(self.Bg, function()
|
||||||
self.curSelect = 0
|
self.curSelect = 0
|
||||||
for j = 1, 5 do
|
for j = 1, 5 do
|
||||||
|
@ -134,7 +141,7 @@ function HomeLand:BindEvent()
|
||||||
end
|
end
|
||||||
NetManager.ArchitectureOperateRequest({HomeLandManager.BuildData[i].dataMain.Id},2,0,function ()
|
NetManager.ArchitectureOperateRequest({HomeLandManager.BuildData[i].dataMain.Id},2,0,function ()
|
||||||
self.mapData[i].leftTime = -1
|
self.mapData[i].leftTime = -1
|
||||||
PopupTipPanel.ShowTip(string.format("<color=#FF0000>%s</color>已升级至<color=#FF0000>%s</color>级",HomeLandManager.BuildData[i].dataMain.Name,HomeLandManager.BuildData[i].dataSingle.level))
|
PopupTipPanel.ShowTip(string.format("<color=#00FF00>%s</color>已升级至<color=#00FF00>%s</color>级",HomeLandManager.BuildData[i].dataMain.Name,HomeLandManager.BuildData[i].dataSingle.level))
|
||||||
NetManager.HomeInfoRequest(function ()
|
NetManager.HomeInfoRequest(function ()
|
||||||
self:OnShow()
|
self:OnShow()
|
||||||
end)
|
end)
|
||||||
|
@ -149,7 +156,7 @@ function HomeLand:BindEvent()
|
||||||
NetManager.ArchitectureOperateRequest({HomeLandManager.BuildData[i].dataMain.Id},4,4021,function ()
|
NetManager.ArchitectureOperateRequest({HomeLandManager.BuildData[i].dataMain.Id},4,4021,function ()
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(4021,1)
|
PrivilegeManager.RefreshPrivilegeUsedTimes(4021,1)
|
||||||
self.mapData[i].leftTime = -1
|
self.mapData[i].leftTime = -1
|
||||||
PopupTipPanel.ShowTip(string.format("<color=#FF0000>%s</color>已升级至<color=#FF0000>%s</color>级",HomeLandManager.BuildData[i].dataMain.Name,HomeLandManager.BuildData[i].dataSingle.level))
|
PopupTipPanel.ShowTip(string.format("<color=#00FF00>%s</color>已升级至<color=#00FF00>%s</color>级",HomeLandManager.BuildData[i].dataMain.Name,HomeLandManager.BuildData[i].dataSingle.level))
|
||||||
NetManager.HomeInfoRequest(function ()
|
NetManager.HomeInfoRequest(function ()
|
||||||
self:OnShow()
|
self:OnShow()
|
||||||
end)
|
end)
|
||||||
|
@ -223,6 +230,7 @@ function HomeLand:BindEvent()
|
||||||
if curObjData.dataSingle.Storage and curObjData.dataSingle.Storage[2][1] ~= 14 and curObjData.dataSingle.Storage[2][2] <= BagManager.GetTotalItemNum(curObjData.dataSingle.Storage[2][1]) then
|
if curObjData.dataSingle.Storage and curObjData.dataSingle.Storage[2][1] ~= 14 and curObjData.dataSingle.Storage[2][2] <= BagManager.GetTotalItemNum(curObjData.dataSingle.Storage[2][1]) then
|
||||||
PopupTipPanel.ShowTip(string.format("%s已达储藏上限,无法收获~",ItemConfig[curObjData.dataSingle.Storage[2][1]].Name))
|
PopupTipPanel.ShowTip(string.format("%s已达储藏上限,无法收获~",ItemConfig[curObjData.dataSingle.Storage[2][1]].Name))
|
||||||
end
|
end
|
||||||
|
coroutine.wait(0.1)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -447,7 +455,7 @@ function HomeLand:SetTime()
|
||||||
end
|
end
|
||||||
self.priviDi:SetActive(HomeLandManager.activePrivilege)
|
self.priviDi:SetActive(HomeLandManager.activePrivilege)
|
||||||
Util.SetGray(self.Privi,not HomeLandManager.activePrivilege)
|
Util.SetGray(self.Privi,not HomeLandManager.activePrivilege)
|
||||||
self.priviText.text = string.format("今日剩余:%s",HomeLandManager.priviLeftTime)
|
self.priviText.text = string.format("今日剩余:%s",HomeLandManager.priviLeftTime)
|
||||||
end, 1, -1, true)
|
end, 1, -1, true)
|
||||||
self.timer:Start()
|
self.timer:Start()
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,6 +27,9 @@ function this:InitComponent(gameObject)
|
||||||
this.costIcon = Util.GetGameObject(gameObject,"Cost/Icon"):GetComponent("Image")
|
this.costIcon = Util.GetGameObject(gameObject,"Cost/Icon"):GetComponent("Image")
|
||||||
this.costNum = Util.GetGameObject(gameObject,"Cost/Num"):GetComponent("Text")
|
this.costNum = Util.GetGameObject(gameObject,"Cost/Num"):GetComponent("Text")
|
||||||
|
|
||||||
|
this.Cost = Util.GetGameObject(gameObject,"Cost")
|
||||||
|
this.Tips = Util.GetGameObject(gameObject,"Tips")
|
||||||
|
|
||||||
this.objList = {}
|
this.objList = {}
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
this.objList[i] = {}
|
this.objList[i] = {}
|
||||||
|
@ -98,11 +101,6 @@ function this:Refresh()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local bool = HomeLandManager.GetCurIndexBtnsShow()
|
|
||||||
-- LogBlue("bool:"..tostring(bool))
|
|
||||||
this.Btn1:SetActive(bool)
|
|
||||||
this.Btn2:SetActive(not bool)
|
|
||||||
|
|
||||||
--显示加持属性
|
--显示加持属性
|
||||||
this:SetData()
|
this:SetData()
|
||||||
end
|
end
|
||||||
|
@ -131,11 +129,25 @@ function this:SetData()
|
||||||
--设置消耗
|
--设置消耗
|
||||||
local limit = EquipStrengthen[HomeLandManager.EquipData[curIndex].Id].Limit
|
local limit = EquipStrengthen[HomeLandManager.EquipData[curIndex].Id].Limit
|
||||||
local cost = EquipStrengthen[HomeLandManager.EquipData[curIndex].Id].Cost
|
local cost = EquipStrengthen[HomeLandManager.EquipData[curIndex].Id].Cost
|
||||||
local color1 = HomeLandManager.BuildData[limit[1]].level >= limit[2] and "#FFFFFF" or "red"
|
-- local color1 = HomeLandManager.BuildData[limit[1]].level >= limit[2] and "#FFEED6" or "red"
|
||||||
this.costCondition.text = string.format("<color=%s>%s到达%s级</color>",color1,HomeLand[limit[1]].Name,limit[2])
|
-- this.costCondition.text = string.format("<color=%s>%s到达%s级</color>",color1,HomeLand[limit[1]].Name,limit[2])
|
||||||
|
this.costCondition.text = HomeLandManager.BuildData[limit[1]].level >= limit[2] and "" or string.format("<color=red>%s到达%s级</color>",HomeLand[limit[1]].Name,limit[2])
|
||||||
this.costIcon.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(cost[1][1]))
|
this.costIcon.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(cost[1][1]))
|
||||||
local color2 = BagManager.GetTotalItemNum(cost[1][1]) >= cost[1][2] and "#FFFFFF" or "red"
|
local color2 = BagManager.GetTotalItemNum(cost[1][1]) >= cost[1][2] and "#FFEED6" or "red"
|
||||||
this.costNum.text = string.format("<color=%s>%s</color>",color2,cost[1][2])
|
this.costNum.text = string.format("<color=%s>%s</color>",color2,cost[1][2])
|
||||||
|
|
||||||
|
--按钮和tips显示
|
||||||
|
|
||||||
|
local bool = HomeLandManager.GetCurIndexBtnsShow()
|
||||||
|
-- LogBlue("bool:"..tostring(bool))
|
||||||
|
this.Btn1:SetActive(bool)
|
||||||
|
this.Btn2:SetActive(not bool)
|
||||||
|
--不同显示
|
||||||
|
this.Cost:SetActive(bool)
|
||||||
|
this.Tips:SetActive(not bool)
|
||||||
|
if not bool and HomeLandManager.GetAllCanUpgrade() then
|
||||||
|
this.Cost:SetActive(true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnClose()
|
function this:OnClose()
|
||||||
|
|
Loading…
Reference in New Issue