43 lines
843 B
Lua
43 lines
843 B
Lua
require("TimedActions/ISBaseTimedAction")
|
|
|
|
TowBarScheduleAction = ISBaseTimedAction:derive("TowBarScheduleAction")
|
|
|
|
function TowBarScheduleAction:isValid()
|
|
return true
|
|
end
|
|
|
|
function TowBarScheduleAction:start()
|
|
end
|
|
|
|
function TowBarScheduleAction:perform()
|
|
if self.performFunc ~= nil then
|
|
self.performFunc(self.character, self.arg1, self.arg2, self.arg3, self.arg4)
|
|
end
|
|
|
|
ISBaseTimedAction.perform(self)
|
|
end
|
|
|
|
function TowBarScheduleAction:stop()
|
|
ISBaseTimedAction.stop(self)
|
|
end
|
|
|
|
function TowBarScheduleAction:new(character, time, performFunc, arg1, arg2, arg3, arg4)
|
|
local o = ISBaseTimedAction.new(self, character)
|
|
|
|
o.useProgressBar = false
|
|
o.stopOnWalk = false
|
|
o.stopOnRun = false
|
|
|
|
o.maxTime = time
|
|
o.character = character
|
|
|
|
o.performFunc = performFunc
|
|
o.arg1 = arg1
|
|
o.arg2 = arg2
|
|
o.arg3 = arg3
|
|
o.arg4 = arg4
|
|
|
|
return o
|
|
end
|
|
|