主角技能提交

dev_chengFeng
wangzhenxing 2021-10-19 10:00:34 +08:00
parent c23a1e9bd0
commit b5f27a64af
4 changed files with 78022 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
MCondition = {}
local this = MCondition
local castRound=0
local _ConditionConfig = {
[0] = function(skill, condition) --0:无限制条件
return true
@ -134,6 +134,27 @@ local _ConditionConfig = {
end
return false
end,
[8] = function(skill, condition) --6:回合cd数限制
local conId = condition[1]
local comType = condition[2]
local comValue = condition[3]
LogError("id=="..conId.." comtype=="..comType.." value=="..comValue)
-- 获取当前回合
local curRound = BattleLogic.GetCurRound()
if castRound==0 then
castRound=curRound
LogError("1111111 "..curRound)
return true
else
if curRound==castRound+comValue then
castRound=curRound
LogError("22222")
return true
end
end
return false
end,
}
-- 条件检测
@ -147,5 +168,12 @@ function MCondition.CheckCondition(skill, condition)
return _ConditionConfig[conId](skill, condition)
end
-- 清除缓存
function MCondition.ClearCache()
if castRound then
castRound=0
end
end
return MCondition

View File

@ -102,6 +102,8 @@ end
-- 初始化事件监听
function this.InitListener()
--每次初始化时间监听前 清除下缓存数据
MCondition.ClearCache()
for triggerId, config in pairs(_TriggerConfig) do
BattleLogic.Event:AddEvent(config.event, function(...)
-- 用于排序

View File

@ -64,6 +64,7 @@ function Practice:InitComponent()
self.treeBtn = Util.GetGameObject(self.gameObject, "Btns/treeBtn")
Util.GetGameObject(self.treeBtn,"treebtn"):GetComponent("Image").sprite = self.spLoader:LoadSprite("j_jianmushenshu_anniu_01_zh")
self.treeRed = Util.GetGameObject(self.treeBtn, "redPoint")
self.skillObj=Util.GetGameObject(self.gameObject, "SkillObj")
end
function Practice:BindEvent()
@ -204,6 +205,7 @@ function Practice:OnOpen()
self.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.XiuXing })
self.BtView:OnOpen(self,{ sortOrder = self.sortingOrder, panelType = PanelTypeView.Practice })
self.mask:SetActive(false)
self.skillObj:SetActive(true)
end
function Practice:OnSortingOrderChange()