‪TechbloxModdingAPI  ‪v2.2.0
‪The unofficial Techblox modding API
TechbloxModdingAPI.Tasks.Repeatable Class Reference

‪An asynchronous repeating task. Once constructed, this can be run by scheduling it with Scheduler.Schedule() More...

Inheritance diagram for TechbloxModdingAPI.Tasks.Repeatable:
TechbloxModdingAPI.Tasks.ISchedulable

Public Member Functions

 Repeatable (Action task, int count, float delay=0.0f)
 ‪Construct a repeating task More...
 
 Repeatable (Action task, ShouldContinue shouldContinue, float delay=0.0f)
 ‪Construct a repeating task More...
 
IEnumerator< TaskContract > Run ()
 ‪Asynchronous task runner More...
 
delegate bool ShouldContinue ()
 ‪Determines if the task should continue to repeat More...
 

Detailed Description

An asynchronous repeating task. Once constructed, this can be run by scheduling it with Scheduler.Schedule()

Constructor & Destructor Documentation

◆ Repeatable() [1/2]

TechbloxModdingAPI.Tasks.Repeatable.Repeatable ( Action  task,
ShouldContinue  shouldContinue,
float  delay = 0.0f 
)
inline

‪Construct a repeating task

Parameters
task‪The task to repeat
shouldContinue‪The check to determine if the task should run again
delay‪The time to wait between repeats (in seconds)

◆ Repeatable() [2/2]

TechbloxModdingAPI.Tasks.Repeatable.Repeatable ( Action  task,
int  count,
float  delay = 0.0f 
)
inline

‪Construct a repeating task

Parameters
task‪The task to repeat
count‪The amount of times to repeat
delay‪The time to wait between repeats (in seconds)

Member Function Documentation

◆ Run()

IEnumerator<TaskContract> TechbloxModdingAPI.Tasks.Repeatable.Run ( )
inline

‪Asynchronous task runner

Returns
‪A yield-ed Svelto.Tasks-compatible object

Implements TechbloxModdingAPI.Tasks.ISchedulable.

◆ ShouldContinue()

delegate bool TechbloxModdingAPI.Tasks.Repeatable.ShouldContinue ( )

‪Determines if the task should continue to repeat

Returns
‪Whether the task should run again (true) or end (false)

The documentation for this class was generated from the following file: