local UIPCSelectEnemyView = UIViewClass() function UIPCSelectEnemyView:OnButtonClicked(comp) if comp == self.btn_Close then self:CloseView() else for index, group in ipairs(self.group_Info) do if comp == group.btn_Choose then self:Execute(index) self:CloseView() return end end end end function UIPCSelectEnemyView:Execute(index) if index == 1 then --小兵割草 CTL.PCGameStreamer.DeactiveMonsterLevelItem() CTL.PCGameStreamer.StartMonsterLevelItem() elseif index == 2 then --无敌人 CTL.PCGameStreamer.DeactiveMonsterLevelItem() elseif index == 3 then UIManager.OpenAndPushAll(Const_UI_Lua.UIEnum.UIPCSelectBossView) end end return UIPCSelectEnemyView