-- 技能装饰功能的基类 (就是Interface) local SkillDecorator = class("SkillDecorator") -- 将字符串转为需要的参数(注意为.) function SkillDecorator.StringParamToFormat(str) return str end function SkillDecorator:initialize(entity, skillID) self.skillID = skillID self.entity = entity self.enable = true end -- ui上面渲染的方法 function SkillDecorator:OnUIBtn() -- 注意这里只是把数据返回给UI即可,不要直接在这设置btn end -- 技能进入时 function SkillDecorator:OnAttackEnter() end -- 技能后摇时 function SkillDecorator:OnSwitchAll() end -- 技能退出时 function SkillDecorator:OnAttackQuit() end function SkillDecorator:SetEnable(value) self.enable = value end function SkillDecorator:Dispose() end return SkillDecorator