Rebornbuddy
Loading...
Searching...
No Matches
TreeSharp.ActionRunCoroutine Class Reference

Represents an action that runs a coroutine. More...

Inheritance diagram for TreeSharp.ActionRunCoroutine:

Public Member Functions

 ActionRunCoroutine (Func< object, Coroutine > coroutineProducer)
 Initializes a new instance with the specified coroutine producer.
 ActionRunCoroutine (Func< object, Task< bool > > taskProducer)
 Initializes a new instance with the specified task producer.
 ActionRunCoroutine (Func< object, CoroutineTask< bool > > taskProducer)
 Initializes a new instance with the specified coroutine task producer.
 ActionRunCoroutine (Func< object, Task > taskProducer)
 Initializes a new instance with the specified task producer.
 ActionRunCoroutine (Func< object, CoroutineTask > taskProducer)
 Initializes a new instance with the specified coroutine task producer.
override void Start (object context)
override void Stop (object context)

Protected Member Functions

override RunStatus Run (object context)

Detailed Description

Represents an action that runs a coroutine.

The RunStatus that this action returns depends on the Coroutine being run.

If the coroutine yields, the action returns RunStatus.Running and does not resume until next tick.

If the coroutine returns boolean false, the action returns RunStatus.Failure.

If the coroutine terminates with any other result than boolean false, the action returns RunStatus.Success.

Constructor & Destructor Documentation

◆ ActionRunCoroutine() [1/5]

TreeSharp.ActionRunCoroutine.ActionRunCoroutine ( Func< object, Coroutine > coroutineProducer)

Initializes a new instance with the specified coroutine producer.

Parameters
coroutineProducerA function that produces a coroutine.

◆ ActionRunCoroutine() [2/5]

TreeSharp.ActionRunCoroutine.ActionRunCoroutine ( Func< object, Task< bool > > taskProducer)

Initializes a new instance with the specified task producer.

Parameters
taskProducerA function that produces a task that is regarded as the root of a coroutine.

◆ ActionRunCoroutine() [3/5]

TreeSharp.ActionRunCoroutine.ActionRunCoroutine ( Func< object, CoroutineTask< bool > > taskProducer)

Initializes a new instance with the specified coroutine task producer.

Parameters
taskProducerA function that produces a coroutine task that is regarded as the root of a coroutine.

◆ ActionRunCoroutine() [4/5]

TreeSharp.ActionRunCoroutine.ActionRunCoroutine ( Func< object, Task > taskProducer)

Initializes a new instance with the specified task producer.

Parameters
taskProducerA function that produces a task that is regarded as the root of a coroutine.

◆ ActionRunCoroutine() [5/5]

TreeSharp.ActionRunCoroutine.ActionRunCoroutine ( Func< object, CoroutineTask > taskProducer)

Initializes a new instance with the specified coroutine task producer.

Parameters
taskProducerA function that produces a coroutine task that is regarded as the root of a coroutine.

Member Function Documentation

◆ Run()

override RunStatus TreeSharp.ActionRunCoroutine.Run ( object context)
protected

◆ Start()

override void TreeSharp.ActionRunCoroutine.Start ( object context)

◆ Stop()

override void TreeSharp.ActionRunCoroutine.Stop ( object context)