Merge branch 'game' of http://127.0.0.1:3000/fatiao/ro-webgl into game
This commit is contained in:
commit
f3a79469cd
@ -2713,8 +2713,9 @@ GameObject:
|
||||
- component: {fileID: 9006747159025689192}
|
||||
- component: {fileID: 7384682116704258391}
|
||||
- component: {fileID: 3720505178724682731}
|
||||
- component: {fileID: 433070626102239402}
|
||||
m_Layer: 5
|
||||
m_Name: AutoFightBtn
|
||||
m_Name: btn_autofight
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -2733,6 +2734,7 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7408400678093284400}
|
||||
- {fileID: 4598635426752587903}
|
||||
m_Father: {fileID: 8637534955793465459}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
@ -2797,7 +2799,8 @@ MonoBehaviour:
|
||||
- UnityEngine.UI.Image
|
||||
- UINode
|
||||
- UnityEngine.UI.Button
|
||||
values: 0000000001
|
||||
- SwitchSprite
|
||||
values: 000001000101
|
||||
depObjs: []
|
||||
activeType: 0
|
||||
--- !u!114 &3720505178724682731
|
||||
@ -2819,7 +2822,7 @@ MonoBehaviour:
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Transition: 0
|
||||
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}
|
||||
@ -2844,6 +2847,21 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &433070626102239402
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3724017537184078275}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a45faf7fe2807c479bb8e75980ed129, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sprites:
|
||||
- {fileID: 21300000, guid: c23a9fe75871ea84c8f3bac9c6e2a5f2, type: 3}
|
||||
- {fileID: 21300000, guid: 9b503f59a7faa0047af0c450946d156a, type: 3}
|
||||
--- !u!1 &4060200757235877208
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4594,9 +4612,9 @@ GameObject:
|
||||
- component: {fileID: 7408400678093284400}
|
||||
- component: {fileID: 5781058779363074390}
|
||||
- component: {fileID: 11797707299733282}
|
||||
- component: {fileID: 6970456381000022696}
|
||||
- component: {fileID: 2302644002314087083}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_Name: text_autofight
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -4618,8 +4636,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: -3.5, y: 6}
|
||||
m_SizeDelta: {x: -7, y: -12}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5781058779363074390
|
||||
CanvasRenderer:
|
||||
@ -4678,11 +4696,11 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 54
|
||||
m_fontSizeBase: 54
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontSizeMax: 54
|
||||
m_fontStyle: 2
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
@ -4693,7 +4711,7 @@ MonoBehaviour:
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
@ -4719,7 +4737,7 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &6970456381000022696
|
||||
--- !u!114 &2302644002314087083
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -4728,10 +4746,18 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 8795308739046552825}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ee125e9b69781314f885ad4a52df54f0, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 8759edc0b8b4b3d4aa8ffef2482e17ee, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_key:
|
||||
UIName:
|
||||
keys:
|
||||
- UnityEngine.RectTransform
|
||||
- UnityEngine.CanvasRenderer
|
||||
- TMPro.TextMeshProUGUI
|
||||
- UINode
|
||||
values: 00000100
|
||||
depObjs: []
|
||||
activeType: 0
|
||||
--- !u!1 &8823547890282511699
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4891,6 +4917,163 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Softness: {x: 0, y: 0}
|
||||
--- !u!1 &9189168646696039823
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4598635426752587903}
|
||||
- component: {fileID: 1961011159449416358}
|
||||
- component: {fileID: 5005798316254621003}
|
||||
- component: {fileID: 9155064406359848308}
|
||||
m_Layer: 5
|
||||
m_Name: text_autofight_time
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4598635426752587903
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9189168646696039823}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7524844236124683473}
|
||||
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: 235, y: 6}
|
||||
m_SizeDelta: {x: 100, y: 40}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1961011159449416358
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9189168646696039823}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5005798316254621003
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9189168646696039823}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\uFF083S\uFF09"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: ff9a33292f9ee2e4bb6b5beaa43eb505, type: 2}
|
||||
m_sharedMaterial: {fileID: 21889736603187208, guid: ff9a33292f9ee2e4bb6b5beaa43eb505,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4283520867
|
||||
m_fontColor: {r: 0.38823533, g: 0.34117648, b: 0.31764707, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &9155064406359848308
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9189168646696039823}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8759edc0b8b4b3d4aa8ffef2482e17ee, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
UIName:
|
||||
keys:
|
||||
- UnityEngine.RectTransform
|
||||
- UnityEngine.CanvasRenderer
|
||||
- TMPro.TextMeshProUGUI
|
||||
- UINode
|
||||
values: 00000100
|
||||
depObjs: []
|
||||
activeType: 0
|
||||
--- !u!1001 &5693425067832136657
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
local UIBattleSuccessView = require("UIBattle/UIBattleSuccessView_Generate")
|
||||
|
||||
--region 生命周期
|
||||
|
||||
|
||||
-- ManagerContainer.DataMgr.DanmuData:
|
||||
function UIBattleSuccessView:OnAwake(data)
|
||||
self.controller = require("UIBattle/UIBattleSuccessCtr"):new()
|
||||
@ -7,10 +10,6 @@ function UIBattleSuccessView:OnAwake(data)
|
||||
self.controller:SetData(data)
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:AddEventListener()
|
||||
ManagerContainer.LuaEventMgr:RegisterUIEvent(self.uiData.name)
|
||||
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:FillContent(data, uiBase)
|
||||
self.uiBase = uiBase
|
||||
@ -38,29 +37,39 @@ function UIBattleSuccessView:Init()
|
||||
end
|
||||
|
||||
self:ShowRewardData()
|
||||
-- local danmuPlayerGo = self.transform:Find("Panel/CommentArea/MyDanmuPlayer")
|
||||
-- self.danmuPlayerComp = danmuPlayerGo:GetComponent("MyDanmuPlayer")
|
||||
-- local danmuList = {
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- "AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
-- }
|
||||
-- self.danmuPlayerComp:ResetPlayer()
|
||||
-- self.danmuPlayerComp:Play(
|
||||
-- danmuList, 10,
|
||||
-- function()
|
||||
-- LogError("Danmu Play Ntf")
|
||||
-- end,
|
||||
-- function()
|
||||
-- LogError("Danmu Play Finished")
|
||||
-- end
|
||||
-- )
|
||||
|
||||
--[[
|
||||
local danmuPlayerGo = self.transform:Find("Panel/CommentArea/MyDanmuPlayer")
|
||||
self.danmuPlayerComp = danmuPlayerGo:GetComponent("MyDanmuPlayer")
|
||||
local danmuList = {
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
"AAAAAAAAAAA111", "VVVVVVVVVV222", "DDDDDDDDDDD333", "FFFFFFFFF444", "EEEEEEEEE555",
|
||||
}
|
||||
self.danmuPlayerComp:ResetPlayer()
|
||||
self.danmuPlayerComp:Play(
|
||||
danmuList, 10,
|
||||
function()
|
||||
LogError("Danmu Play Ntf")
|
||||
end,
|
||||
function()
|
||||
LogError("Danmu Play Finished")
|
||||
end
|
||||
)
|
||||
]]
|
||||
|
||||
self:AutoBatlle()
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:AddEventListener()
|
||||
ManagerContainer.LuaEventMgr:RegisterUIEvent(self.uiData.name)
|
||||
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:RemoveEventListener()
|
||||
@ -73,17 +82,6 @@ function UIBattleSuccessView:AddUIEventListener()
|
||||
ManagerContainer.LuaEventMgr:RegisterEvent(UIEventNames.EID_DANMU_INPUT_NTF, self, self.OnDanmuInputNtf)
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:OnBtnSendDanmu()
|
||||
ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UIDanmuInput, "UIBattleSuccess")
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:OnDanmuInputNtf(uiName, danmuStr)
|
||||
if uiName == "UIBattleSuccess" then
|
||||
LogError("[UIBattleSuccessView] OnDanmuInputNtf "..danmuStr)
|
||||
self.danmuPlayerComp:PlayMySelf(danmuStr)
|
||||
end
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:OnHide()
|
||||
|
||||
end
|
||||
@ -100,6 +98,27 @@ function UIBattleSuccessView:OnDispose()
|
||||
self.controller:OnDispose()
|
||||
end
|
||||
|
||||
--endregion 生命周期
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function UIBattleSuccessView:OnBtnSendDanmu()
|
||||
ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UIDanmuInput, "UIBattleSuccess")
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:OnDanmuInputNtf(uiName, danmuStr)
|
||||
if uiName == "UIBattleSuccess" then
|
||||
LogError("[UIBattleSuccessView] OnDanmuInputNtf "..danmuStr)
|
||||
self.danmuPlayerComp:PlayMySelf(danmuStr)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function UIBattleSuccessView:ShowRewardData()
|
||||
local awardDatas = {}
|
||||
local inputData = self.controller:GetData()
|
||||
@ -133,5 +152,61 @@ function UIBattleSuccessView:OnBackBtn()
|
||||
--ManagerContainer.LuaEventMgr:Dispatch(UIEventNames.UI_FORCE_GUIDE_TRIGGER, Enum.ForceGuideTriggerEnum.BattleWin)
|
||||
end
|
||||
|
||||
function UIBattleSuccessView:AutoBatlle()
|
||||
|
||||
local isauto= ManagerContainer.LuaBattleMgr:GetAutoChallengeState()
|
||||
|
||||
self.text_autofight:SetActive(false)
|
||||
self.text_autofight_time:SetActive(false)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if isauto==true then
|
||||
local flag=4
|
||||
--按钮
|
||||
self.btn_autofight.button.interactable=false
|
||||
self.btn_autofight.image.sprite=self.btn_autofight.switchSprite:GetSprite("img_result_btn_auto_fighting")
|
||||
|
||||
--文字
|
||||
|
||||
self.text_autofight_time.text.text = "("..flag.."S)"
|
||||
self.text_autofight_time:SetActive(true)
|
||||
|
||||
|
||||
ManagerContainer.LuaTimerMgr:AddLuaTimer(1000, 4, function()
|
||||
|
||||
flag=flag-1
|
||||
self.text_autofight_time.text.text = "(" .. flag .. "S)"
|
||||
if flag==0 then
|
||||
self:UIClose()
|
||||
ManagerContainer.LuaEventMgr:Dispatch(UIEventNames.EID_CHALLENGE_AUTO)
|
||||
end
|
||||
end)
|
||||
|
||||
else
|
||||
--文字
|
||||
self.text_autofight:SetActive(true)
|
||||
|
||||
--按钮
|
||||
self.btn_autofight.image.sprite = self.btn_autofight.switchSprite:GetSprite("img_result_btn_auto_fight")
|
||||
|
||||
self.uiBase:AddButtonUniqueEventListener(self.btn_autofight.button, self, function()
|
||||
|
||||
ManagerContainer.LuaBattleMgr:SetAutoChallengeState(true)
|
||||
ManagerContainer.LuaEventMgr:Dispatch(UIEventNames.EID_CHALLENGE_AUTO)
|
||||
self:UIClose()
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
return UIBattleSuccessView
|
||||
|
||||
|
||||
@ -2,9 +2,19 @@
|
||||
---@field public gameObject UnityEngine.GameObject
|
||||
---@field public button UnityEngine.UI.Button
|
||||
|
||||
---@class UIBattleSuccess__Generate_autoFightBtn
|
||||
---@class UIBattleSuccess__Generate_text_autofight_time
|
||||
---@field public gameObject UnityEngine.GameObject
|
||||
---@field public text TMPro.TextMeshProUGUI
|
||||
|
||||
---@class UIBattleSuccess__Generate_text_autofight
|
||||
---@field public gameObject UnityEngine.GameObject
|
||||
---@field public text TMPro.TextMeshProUGUI
|
||||
|
||||
---@class UIBattleSuccess__Generate_btn_autofight
|
||||
---@field public gameObject UnityEngine.GameObject
|
||||
---@field public image UnityEngine.UI.Image
|
||||
---@field public button UnityEngine.UI.Button
|
||||
---@field public switchSprite SwitchSprite
|
||||
|
||||
---@class UIBattleSuccess__Generate_backBtn
|
||||
---@field public gameObject UnityEngine.GameObject
|
||||
@ -103,7 +113,9 @@
|
||||
---@field private coin UIBattleSuccess__Generate_coin
|
||||
---@field private drop UIBattleSuccess__Generate_drop
|
||||
---@field private backBtn UIBattleSuccess__Generate_backBtn
|
||||
---@field private autoFightBtn UIBattleSuccess__Generate_autoFightBtn
|
||||
---@field private btn_autofight UIBattleSuccess__Generate_btn_autofight
|
||||
---@field private text_autofight UIBattleSuccess__Generate_text_autofight
|
||||
---@field private text_autofight_time UIBattleSuccess__Generate_text_autofight_time
|
||||
---@field private autoFightingBtn UIBattleSuccess__Generate_autoFightingBtn
|
||||
local UIBattleSuccessView = class("UIBattleSuccessView", require("UIViewBase"))
|
||||
|
||||
@ -146,6 +158,8 @@ function UIBattleSuccessView:InitGenerate(Root, data)
|
||||
self:InitGenerate__20(Root,data)
|
||||
self:InitGenerate__21(Root,data)
|
||||
self:InitGenerate__22(Root,data)
|
||||
self:InitGenerate__23(Root,data)
|
||||
self:InitGenerate__24(Root,data)
|
||||
|
||||
|
||||
end
|
||||
@ -421,19 +435,51 @@ end
|
||||
---@private
|
||||
function UIBattleSuccessView:InitGenerate__21(Root, data)
|
||||
--[[
|
||||
Panel/Bottom/AutoFightBtn
|
||||
Panel/Bottom/btn_autofight
|
||||
--]]
|
||||
local tmp = Root:Find("Panel/Bottom/AutoFightBtn").gameObject
|
||||
local tmp = Root:Find("Panel/Bottom/btn_autofight").gameObject
|
||||
if tolua.getpeer(tmp) == nil then
|
||||
tolua.setpeer(tmp, {})
|
||||
end
|
||||
self.autoFightBtn = tmp
|
||||
self.btn_autofight = tmp
|
||||
|
||||
tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
|
||||
|
||||
tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
|
||||
|
||||
tmp.switchSprite = tmp:GetComponent(Enum.TypeInfo.SwitchSprite)
|
||||
end
|
||||
|
||||
---@private
|
||||
function UIBattleSuccessView:InitGenerate__22(Root, data)
|
||||
--[[
|
||||
Panel/Bottom/btn_autofight/text_autofight
|
||||
--]]
|
||||
local tmp = Root:Find("Panel/Bottom/btn_autofight/text_autofight").gameObject
|
||||
if tolua.getpeer(tmp) == nil then
|
||||
tolua.setpeer(tmp, {})
|
||||
end
|
||||
self.text_autofight = tmp
|
||||
|
||||
tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
|
||||
end
|
||||
|
||||
---@private
|
||||
function UIBattleSuccessView:InitGenerate__23(Root, data)
|
||||
--[[
|
||||
Panel/Bottom/btn_autofight/text_autofight_time
|
||||
--]]
|
||||
local tmp = Root:Find("Panel/Bottom/btn_autofight/text_autofight_time").gameObject
|
||||
if tolua.getpeer(tmp) == nil then
|
||||
tolua.setpeer(tmp, {})
|
||||
end
|
||||
self.text_autofight_time = tmp
|
||||
|
||||
tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
|
||||
end
|
||||
|
||||
---@private
|
||||
function UIBattleSuccessView:InitGenerate__24(Root, data)
|
||||
--[[
|
||||
Panel/Bottom/AutoFightingBtn
|
||||
--]]
|
||||
@ -522,10 +568,18 @@ function UIBattleSuccessView:GenerateDestroy()
|
||||
tolua.setpeer(self.backBtn, nil)
|
||||
end
|
||||
self.backBtn = nil
|
||||
if tolua.getpeer(self.autoFightBtn) ~= nil then
|
||||
tolua.setpeer(self.autoFightBtn, nil)
|
||||
if tolua.getpeer(self.btn_autofight) ~= nil then
|
||||
tolua.setpeer(self.btn_autofight, nil)
|
||||
end
|
||||
self.autoFightBtn = nil
|
||||
self.btn_autofight = nil
|
||||
if tolua.getpeer(self.text_autofight) ~= nil then
|
||||
tolua.setpeer(self.text_autofight, nil)
|
||||
end
|
||||
self.text_autofight = nil
|
||||
if tolua.getpeer(self.text_autofight_time) ~= nil then
|
||||
tolua.setpeer(self.text_autofight_time, nil)
|
||||
end
|
||||
self.text_autofight_time = nil
|
||||
if tolua.getpeer(self.autoFightingBtn) ~= nil then
|
||||
tolua.setpeer(self.autoFightingBtn, nil)
|
||||
end
|
||||
|
||||
@ -423,6 +423,7 @@ function UIBattleView:InitMinimapGoes()
|
||||
end
|
||||
|
||||
function UIBattleView:RefreshStoryTaskInfo()
|
||||
|
||||
-- 先获取当前关卡,再查找当前关卡对应的StoryId,通过StoryId分析出当前Story和接下来2个Story
|
||||
-- 获取到了当前Story,再分析出当前Story的进度信息
|
||||
local curMapId, curLevelId = ManagerContainer.LuaBattleMgr:GetCurMapAndLevel()
|
||||
@ -586,6 +587,7 @@ function UIBattleView:RefreshStoryTaskInfo()
|
||||
ManagerContainer.LuaEventMgr:Dispatch(UIEventNames.EID_CURR_STORY_TASK_NTF,
|
||||
currTaskShowData.subTasksFinishInfo[firstUnfinishId])
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
------------------在线奖励
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user