miduo_client/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Weapon/WeaponSkillManager.lua

51 lines
1.8 KiB
Lua
Raw Normal View History

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("创建神兵技能组====================")
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)
--LogError("创建神兵技能====================")
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