We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为了代码复用,将一些公共的东西放到某个文件中。 alice和bob都引用了mallory。 游戏几乎一定会在结束时弹出总结的时候挂掉。
以下是示例代码:
mallory.lua:
mallory.lua
mallory = {} mallory.hidden = true mallory.marv = sgs.CreateTriggerSkill { name = "marv", frequency = sgs.Skill_NotFrequent, events = {sgs.DamageCaused}, on_trigger = function(self, event, player, data) return false end } return mallory
alice.lua:
alice.lua
module("extensions.alice", package.seeall) extension = sgs.Package("alice") local mallory = require("extensions/mallory") alice=sgs.General(extension, "alice","wei", 5, false)
bob.lua:
bob.lua
module("extensions.bob", package.seeall) extension = sgs.Package("bob") local mallory = require("extensions/mallory") bob=sgs.General(extension, "bob","wei", 4, true) bob:addSkill(mallory.marv)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
为了代码复用,将一些公共的东西放到某个文件中。
alice和bob都引用了mallory。
游戏几乎一定会在结束时弹出总结的时候挂掉。
以下是示例代码:
mallory.lua
:alice.lua
:bob.lua
:The text was updated successfully, but these errors were encountered: