Gaming
 

Chronos.performTask

From WoWWiki

(removed in v2.01 of Chronos)


This article is a part of the documentation of the Chronos function library

	--[[
	--	performTask( TaskObject );
	--		
	--		Queues up a task to be completed over time. 
	--		Contains a before and after function 
	--		to be called when the task is started and
	--		completed.
	--		
	--	Args:
	--		TaskObject - a table containing:
	--		{
	--		 (Required:)
	--		  step - function to be performed, must be fast
	--
	--		  isDone - function which determines if the 
	--		  	task is completed. 
	--		  	Returns true when done
	--		  	Returns false if the task should continue
	--		  	 to call step() each frame. 
	--		  
	--
	--		 (Optional:)
	--		  stepArgs - arguments to be passed to step
	--		  doneArgs - arguments to be passed to isDone
	--
	--		  before - function called before the first step
	--		  beforeArgs - arguments passed to Before
	--
	--		  after - function called when isDone returns true
	--		  afterArgs - arguments passed
	--
	--		  limit - a number defining the maximum number
	--		  	of steps that will be peformed before
	--		  	the task is removed to prevent lag.
	--		  	(Defaults to 100)
	--		}
 	--]]