Intial Commit
This commit is contained in:
42
42.13/media/lua/client/TowBar/ScheduleAction.lua
Normal file
42
42.13/media/lua/client/TowBar/ScheduleAction.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user