2023-04-06 14:02:32 +08:00
|
|
|
require("Modules.Battle.Logic.Weapon.WeaponTrigger")
|
|
|
|
require("Modules.Battle.Logic.Weapon.WeaponSkill")
|
|
|
|
require("Modules.Battle.Logic.Weapon.WeaponSkillGroup")
|
|
|
|
|
|
|
|
WeaponSkillManager = {}
|
|
|
|
local this = WeaponSkillManager
|
|
|
|
|
|
|
|
function this.Init()
|
|
|
|
this.MSkillGroupList = {} -- 技能组列表
|
|
|
|
this.MSkillList = {} -- 技能列表
|
|
|
|
WeaponTrigger.Init()
|
|
|
|
end
|
|
|
|
|
|
|
|
-- 创建一个技能组
|
|
|
|
function this.CreateMSkillGroup(monster, groupIndex, skillGroupData)
|
2023-04-07 11:33:50 +08:00
|
|
|
--LogError("创建神兵技能组====================")
|
2023-04-06 14:02:32 +08:00
|
|
|
local position = monster:GetCamp() * 6 + monster:GetPosition()
|
|
|
|
if not this.MSkillGroupList then
|
|
|
|
this.MSkillGroupList = {}
|
|
|
|
end
|
|
|
|
if not this.MSkillGroupList[position] then
|
|
|
|
this.MSkillGroupList[position] = WeaponSkillGroup:New()
|
|
|
|
end
|
|
|
|
this.MSkillGroupList[position]:Init(monster, groupIndex, skillGroupData)
|
|
|
|
return this.MSkillGroupList[position]
|
|
|
|
end
|
|
|
|
|
|
|
|
-- 创建一个技能
|
|
|
|
function this.CreateMSkill(monster, group, index, skilldata,groupIndex)
|
2023-04-07 16:11:39 +08:00
|
|
|
--LogError("创建神兵技能====================")
|
2023-04-06 14:02:32 +08:00
|
|
|
local owner = group:GetOwner()
|
|
|
|
local groupIndex = group.groupIndex
|
|
|
|
local position = owner:GetCamp() * 6 + owner:GetPosition()
|
|
|
|
if not this.MSkillList then
|
|
|
|
this.MSkillList = {}
|
|
|
|
end
|
|
|
|
if not this.MSkillList[position] then
|
|
|
|
this.MSkillList[position] = {}
|
|
|
|
end
|
|
|
|
if not this.MSkillList[position][groupIndex] then
|
|
|
|
this.MSkillList[position][groupIndex] = {}
|
|
|
|
end
|
|
|
|
if not this.MSkillList[position][groupIndex][index] then
|
|
|
|
this.MSkillList[position][groupIndex][index] = WeaponSkill:New()
|
|
|
|
end
|
|
|
|
this.MSkillList[position][groupIndex][index]:Init(monster, group, index, skilldata,groupIndex)
|
|
|
|
|
|
|
|
return this.MSkillList[position][groupIndex][index]
|
|
|
|
end
|
|
|
|
|
|
|
|
return WeaponSkillManager
|