
J
Publisher
jamesika
FUCoroutine
Tools
Coroutine C# Wait Process Manager Pause Control
It's just fxxking same as Unity Coroutine.
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
FUCoroutine
It's just fxxking same as Unity Coroutine.
It's a plugin for Godot Engine.
Features
StartCoroutine & StopCoroutine
public partial class ExampleNode : Node
{
public void Example()
{
var coroutineHandler = CoroutineManager.StartCoroutine(CustomCoroutine());
CoroutineManager.StopCoroutine(coroutineHandler);
}
}
StartCoroutine & StopCoroutine from node
public partial class ExampleNode : Node
{
public void Example()
{
var coroutineHandler = this.StartCoroutine(CustomCoroutine());
this.StopCoroutine(coroutineHandler);
}
}
- If the node is free or remove from tree, the coroutine will be automaticlly stopped.
- If the node is paused (
GetTree().Paused = true
), the coroutine will be paused, too.
Wait For XXX
public IEnumerator Example()
{
// Same as Unity : WaitForEndOfFrame()
yield return new WaitForEndOfProcess();
// Same as Unity, Wait one frame
yield return null;
yield return new WaitForFrames(10);
// Same as Unity :WaitForFixedUpdate()
yield return new WaitForPhysicsProcess();
// Same as Unity
yield return new WaitForSeconds(1.0);
// Same as Unity, ignore Godot.Engine.TimeScale. **but if TimeScale is zero, WaitForSecondsRealtime will be paused.**
yield return new WaitForSecondsRealtime(1.0);
// Same as Unity
yield return new WaitUtil(Validate());
// Same as Unity
yield return new WaitWhile(Validate());
}
Custom Wait For Something
public class WaitForSomething : YieldInstruction
{
public override bool IsComplete()
{
// Is it completed ?
}
}