forked from Bastion/Bastion
Compare commits
6 Commits
8cf6ffcb8e
...
630fcfc3d9
Author | SHA1 | Date |
---|---|---|
LyLoLoq | 630fcfc3d9 | 1 year ago |
4n0n | d5b0ccf42b | 1 year ago |
4n0n | 5f0affd907 | 1 year ago |
4n0n | 356cc78dd1 | 1 year ago |
4n0n | 5bfc4f5097 | 1 year ago |
4n0n | 031e7e302d | 2 years ago |
@ -0,0 +1,17 @@ |
||||
local Tinkr, Bastion = ... |
||||
local ExampleModule = Bastion.Module:New('ExampleModule') |
||||
local Player = Bastion.UnitManager:Get('player') |
||||
|
||||
local FlashHeal = Bastion.SpellBook:GetSpell(2061) |
||||
|
||||
local AdvancedMath = Bastion:GetLibrary('AdvancedMath') |
||||
|
||||
print(AdvancedMath:Add(1, 2)) |
||||
|
||||
ExampleModule:Sync(function() |
||||
if Player:GetHP() <= 50 then |
||||
FlashHeal:Cast(Player) |
||||
end |
||||
end) |
||||
|
||||
Bastion:Register(ExampleModule) |
@ -0,0 +1,14 @@ |
||||
local Tinkr, Bastion = ... |
||||
|
||||
local ExampleModule = Bastion.Module:New('ExampleModule') |
||||
local Player = Bastion.UnitManager:Get('player') |
||||
|
||||
local AdvancedMath = {} |
||||
|
||||
AdvancedMath.__index = AdvancedMath |
||||
|
||||
function AdvancedMath:Add(a, b) |
||||
return a + b |
||||
end |
||||
|
||||
Bastion:RegisterLibrary('AdvancedMath', AdvancedMath) |
Loading…
Reference in new issue