From 6f89bbc4305ce9ebcecbafd8dce8eacb2be9f569 Mon Sep 17 00:00:00 2001 From: Inspiaaa Date: Tue, 10 Sep 2024 23:35:13 +0200 Subject: [PATCH] Refactor CoroutineBase Move constructor to before methods --- addons/HCoroutines/src/CoroutineBase.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/HCoroutines/src/CoroutineBase.cs b/addons/HCoroutines/src/CoroutineBase.cs index c2b7875..f09de2b 100644 --- a/addons/HCoroutines/src/CoroutineBase.cs +++ b/addons/HCoroutines/src/CoroutineBase.cs @@ -45,6 +45,12 @@ public class CoroutineBase /// public event Action Stopped; + public CoroutineBase(CoProcessMode processMode, CoRunMode runMode) + { + this.ProcessMode = processMode; + this.RunMode = runMode; + } + public void StartCoroutine(CoroutineBase coroutine) { if (!IsAlive) @@ -58,12 +64,6 @@ public void StartCoroutine(CoroutineBase coroutine) AddChild(coroutine); coroutine.Init(); } - - public CoroutineBase(CoProcessMode processMode, CoRunMode runMode) - { - this.ProcessMode = processMode; - this.RunMode = runMode; - } /// /// Initializes the coroutine once it has been added to the active coroutine hierarchy.