From 1498cd7661009ed19bb49ca3f0f597875275d91f Mon Sep 17 00:00:00 2001 From: liujiaqi Date: Fri, 19 Nov 2021 17:20:28 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E3=80=90=E6=96=B0=E6=89=8B=E6=88=98?= =?UTF-8?q?=E6=96=97=E3=80=91=E6=8A=A5=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/GuideBattlePanel.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua index ad192b8d45..a938884294 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua @@ -182,15 +182,12 @@ function this.OnRoundChanged(round) --显示波次 local curRound, maxRound = BattleLogic.GetCurRound() this.roundText.text = string.format(Language[10211], curRound, maxRound) - - --显示波次 - GuideBattleLogic:OnRoundChanged(round) end -- 回合结束 function this.BattleRoundEnd(Round) -- 回调UI层 - GuideBattleLogic.BattleRoundEnd(Round) + GuideBattleLogic:BattleRoundEnd(Round) end -- 角色轮转回调 From 3a70720f9c63ce7e47237833ddade375357bbef4 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 15 Nov 2021 17:26:04 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E3=80=90=E6=96=B0=E6=89=8B=E6=88=98?= =?UTF-8?q?=E6=96=97=E3=80=91=E7=AC=AC=E4=B8=80=E5=9C=BA=E6=88=98=E6=96=97?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=B7=B3=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/GuideBattlePanel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua index a938884294..11cc7a75b1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua @@ -92,7 +92,7 @@ function this:OnOpen(_fightData, _endFunc, guideType) this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(BattleManager.GetBattleBg(fightType)) end - this.BtnGM:SetActive(true) + this.BtnGM:SetActive(guideType ~= 3) this.ButtonLock:SetActive(false) this.BtnTimeScale:SetActive(false) this.damagePanel:SetActive(false) From b6ea2500960a2bb37500c263c0567333444372ad Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 15 Nov 2021 18:34:25 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E3=80=90=E6=96=B0=E6=89=8B=E6=88=98?= =?UTF-8?q?=E6=96=97=E3=80=91=E9=80=89=E6=8B=A9=E5=A5=B3=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=88=98=E6=96=97=E4=B8=AD=E7=AB=8B=E7=BB=98?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=B8=BA=E5=A5=B3=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/BattleView.lua | 11 ++++++++ .../Modules/Battle/View/GuideBattlePanel.lua | 25 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua index ca1bdb1082..15f83aef36 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattleView.lua @@ -705,6 +705,17 @@ function this.OnAddMonster(data) end end + +-- 遍历灵兽列表 +function this.ForeachMonster(func) + for _, monster in pairs(tbMonster) do + if func then + func(monster) + end + end +end + +-- 移除灵兽 function this.OnRemoveMonster(data) local view = tbMonster[data] if view then diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua index 11cc7a75b1..b6c5736a5b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua @@ -65,10 +65,12 @@ end --添加事件监听(用于子类重写) function this:AddListener() + Game.GlobalEvent:AddEvent(GameEvent.Player.OnChangeName, this.OnNameChange) end --移除事件监听(用于子类重写) function this:RemoveListener() + Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnChangeName, this.OnNameChange) end function this:OnSortingOrderChange() @@ -200,6 +202,29 @@ function this.OnUpdate() end +-- 当改变姓名的时候 +function this.OnNameChange() + if this.guideType == 3 and NameManager.roleSex ~= ROLE_SEX.BOY then + BattleView.ForeachMonster(function(monster) + if monster.role.position == 100 and monster.camp == 0 then + -- 删除原来的 + GameObject.DestroyImmediate(monster.RoleLiveGO2) + -- casting技能立绘 替换成女角色 + monster.livePath="live2d_npc_girl" + monster.RoleLiveGO2 = poolManager:LoadLive(monster.livePath, monster.skillCastRoot.gameObject.transform.parent, Vector3.one, Vector3.zero) + monster.RoleLiveGO2.transform:SetParent(monster.skillCastRoot.gameObject.transform) + monster.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(monster.offset[1], monster.offset[2]) + monster.RoleLiveGO2.transform.localScale = Vector3.one * monster.play_liveScale + monster.RoleLiveGO2:SetActive(false) + monster.RoleLiveGOGraphic2 = monster.RoleLiveGO2:GetComponent("SkeletonGraphic") + monster.RoleLiveGOTran2 = monster.RoleLiveGO2:GetComponent("RectTransform") + monster.RoleLiveGOGraphic2.AnimationState:SetAnimation(0, "idle", true) + monster.RoleLiveGOTran2.sizeDelta = Vector2.New(1000, 1000) + end + end) + end +end + --界面关闭时调用(用于子类重写) function this:OnClose() BattleView:OnClose() From 5eaf88defb64bc195d03d44e74dfe4372096eeaa Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Tue, 16 Nov 2021 11:53:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E3=80=90GM=E3=80=91=E4=BF=AE=E6=94=B9GM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Main/GMPanel.lua | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua index 95cc9e88e2..5380e8b02a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua @@ -45,19 +45,40 @@ GMPanel = Inherit(BasePanel) local this = GMPanel local heroList = { - "4#10033#11", "4#10085#11", "4#10008#11", "4#10089#11", "4#10006#11", "4#10009#11", "4#10023#11" + "4#10001#10","4#10002#10","4#10003#10","4#10004#10","4#10005#10","4#10006#10", + "4#10007#10","4#10008#10","4#10009#10","4#10010#10","4#10011#10","4#10012#10", + "4#10013#10","4#10014#10","4#10015#10","4#10016#10","4#10017#10","4#10018#10", + "4#10019#10","4#10020#10","4#10021#10","4#10022#10","4#10023#10","4#10024#10", + "4#10025#10","4#10026#10","4#10027#10","4#10028#10","4#10029#10","4#10030#10", + "4#10031#10","4#10032#10","4#10033#10","4#10034#10","4#10035#10","4#10036#10", + "4#10037#10","4#10038#10","4#10039#10","4#10041#10","4#10042#10","4#10043#10", + "4#10044#10","4#10045#10","4#10046#10","4#10087#10","4#10088#10","4#10089#10", + "4#10085#10","4#10040#10","4#10086#10","4#10001#11","4#10043#11","4#10011#11", + "4#10013#11","4#10020#11","4#10087#11","4#10012#11","4#10015#11","4#10040#11", + "4#10014#11","4#10009#11","4#10001#11","4#10022#11","4#10023#11","4#10086#11", + "4#10089#11","4#10092#11","4#10006#11","4#10008#11","4#10085#11","4#10011#11", + "4#10091#11","4#10090#11","4#10088#11","4#10041#11","4#10026#11","4#10016#11", + "4#10017#11","4#10087#11","4#10021#11","4#10004#11","4#10007#11","4#10010#11", + "4#10012#11","4#10015#11","4#10033#11","4#10020#11","4#10002#11","4#10003#11", + "4#10005#11","4#10018#11","4#10019#11","4#10024#11","4#10042#11","4#10043#11","4#10013#11", } local baowuList = { - "1#100005#1", "1#100010#1", "1#100015#1", "1#100020#1", "1#100025#1","1#100030#1", "1#100035#1","1#100040#1" + "1#100001#40", "1#100002#40", "1#100003#40", "1#100004#40", "1#100005#40", "1#100006#40", "1#100007#40", "1#100008#40", "1#100009#40", + "1#100010#40", "1#100011#40", "1#100012#40", "1#100013#40", "1#100014#40", "1#100015#40", "1#100016#40", "1#100017#40", "1#100018#40", + "1#100019#40", "1#100020#40", "1#100021#40", "1#100022#40", "1#100023#40", "1#100024#40", "1#100025#40", "1#100026#40", "1#100027#40", + "1#100028#40", "1#100029#40", "1#100030#40", "1#100031#40", "1#100032#40", "1#100033#40", "1#100034#40", "1#100035#40", "1#100036#40", + "1#100037#40", "1#100038#40", "1#100039#40", "1#100040#40", "1#32#9999999", "1#29#9999999", } local equipeList = { - "1#60158#1", "1#60183#1", "1#60193#1", "1#60198#1", - "1#60159#1", "1#60184#1", "1#60194#1", "1#60199#1", - "1#60160#1", "1#60185#1", "1#60200#1", "1#60201#1", - "1#60161#1", "1#60186#1", "1#60202#1", "1#60208#1", - "1#60162#1", "1#60187#1", "1#60203#1", "1#60209#1", + "1#60001#6","1#60002#6","1#60034#6","1#60035#6","1#60067#6","1#60068#6","1#60069#6","1#60100#6","1#60101#6","1#60102#6","1#60103#6","1#60155#6","1#60156#6", + "1#60157#6","1#60158#6","1#60159#6","1#60160#6","1#60016#6","1#60017#6","1#60049#6","1#60050#6","1#60082#6","1#60083#6","1#60084#6","1#60125#6","1#60126#6", + "1#60127#6","1#60128#6","1#60180#6","1#60181#6","1#60182#6","1#60183#6","1#60184#6","1#60185#6","1#60022#6","1#60023#6","1#60055#6","1#60056#6","1#60088#6", + "1#60089#6","1#60090#6","1#60135#6","1#60136#6","1#60137#6","1#60138#6","1#60190#6","1#60191#6","1#60192#6","1#60193#6","1#60194#6","1#60200#6","1#60025#6", + "1#60026#6","1#60058#6","1#60059#6","1#60091#6","1#60092#6","1#60093#6","1#60140#6","1#60141#6","1#60142#6","1#60144#6","1#60195#6","1#60196#6","1#60197#6", + "1#60198#6","1#60199#6","1#60201#6","1#60161#6","1#60162#6","1#60163#6","1#60164#6","1#60165#6","1#60166#6","1#60186#6","1#60187#6","1#60188#6","1#60189#6", + "1#60178#6","1#60179#6","1#60202#6","1#60203#6","1#60204#6","1#60205#6","1#60206#6","1#60207#6","1#60208#6","1#60209#6","1#60210#6","1#60211#6","1#60212#6","1#60213#6", } -local moneyList = {"1#3#99999999", "1#4#99999999", "1#5#99999999", "1#14#999999999", "1#15#99999999", "1#16#99999999","1#1226#99999999"} +local moneyList = {"1#74#999", "1#87#999", "1#1226#99999999", "1#5000050#99", "1#20007#10", "1#1203#10000", "1#14#500000000","1#16#400000000", "1#3#500000000", "1#4#9999999", "1#20#999999",} --初始化组件(用于子类重写) function GMPanel:InitComponent() this.spLoader = SpriteLoader.New() @@ -84,10 +105,10 @@ function GMPanel:InitComponent() {type = GMType.Player, subType = GMSubType.Server, inputNum = 0, args = "8#1#1", btnTip = "通关所有关卡", inputTip = {}, callBack = nil}, -- {type = GMType.Player, subType = GMSubType.Server, inputNum = 0, args = "6#0#0", btnTip = "一键物品", inputTip = {""}, callBack = nil}, -- {type = GMType.Player, subType = GMSubType.Server, inputNum = 0, args = "22#0#0", btnTip = "一键异妖", inputTip = {""}, callBack = nil}, - {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "生成五个12星英雄", inputTip = {""}, callBack = this.FiveHero}, + {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "全10/11神将", inputTip = {""}, callBack = this.FiveHero}, {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "一键很多钱", inputTip = {""}, callBack = this.GetMoney}, - {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "生成顶级魂灵宝", inputTip = {""}, callBack = this.Baowu}, - {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "生成顶级装备", inputTip = {""}, callBack = this.GetEquipe}, + {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "生成魂灵宝和材料", inputTip = {""}, callBack = this.Baowu}, + {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "生成所有装备", inputTip = {""}, callBack = this.GetEquipe}, {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "生成很多物品", inputTip = {""}, callBack = this.GetAllItems}, {type = GMType.Player, subType = GMSubType.Func, inputNum = 0, args = "", btnTip = "鑫鹏的gm", inputTip = {""}, callBack = this.SendToXinPeng},