forked from Bastion/Bastion
parent
e3d52b41c4
commit
5f0affd907
@ -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