diff --git a/src/CoroutineBase.cs b/src/CoroutineBase.cs
index 312adb3..f3b6142 100644
--- a/src/CoroutineBase.cs
+++ b/src/CoroutineBase.cs
@@ -63,7 +63,7 @@ public void Init()
///
/// Called when the coroutine starts.
///
- public virtual void OnEnter() { }
+ protected virtual void OnEnter() { }
///
/// Called every frame if the coroutine is playing.
@@ -73,14 +73,14 @@ public virtual void Update() { }
///
/// Called when the coroutine is killed.
///
- public virtual void OnExit() { }
+ protected virtual void OnExit() { }
///
/// Starts playing this coroutine, meaning that it will receive Update() calls
/// each frame. This is independent of the child coroutines.
/// This method only works if the coroutine is still alive.
///
- public void ResumeUpdates()
+ protected void ResumeUpdates()
{
if (!IsAlive)
{
@@ -95,7 +95,7 @@ public void ResumeUpdates()
/// Stops giving the coroutine Update() calls each frame.
/// This is independent of the child coroutines.
///
- public void PauseUpdates()
+ protected void PauseUpdates()
{
IsPlaying = false;
Manager.DeactivateCoroutine(this);
@@ -147,7 +147,7 @@ public void Kill()
///
/// Adds a coroutine as a child.
///
- protected void AddChild(CoroutineBase coroutine)
+ private void AddChild(CoroutineBase coroutine)
{
if (firstChild == null)
{
@@ -165,7 +165,7 @@ protected void AddChild(CoroutineBase coroutine)
///
/// Removes a child from the list of child coroutines.
///
- protected void RemoveChild(CoroutineBase coroutine)
+ private void RemoveChild(CoroutineBase coroutine)
{
if (coroutine.previousSibling != null)
{
diff --git a/src/Coroutines/AwaitCoroutine.cs b/src/Coroutines/AwaitCoroutine.cs
index 216c73e..f721c1a 100644
--- a/src/Coroutines/AwaitCoroutine.cs
+++ b/src/Coroutines/AwaitCoroutine.cs
@@ -16,7 +16,7 @@ public AwaitCoroutine(Task task)
this.Task = task;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
// As the CoroutineManager class is not thread safe, ensure that Kill()
// is executed on the main Godot thread.
@@ -39,7 +39,7 @@ public AwaitCoroutine(Task task)
this.Task = task;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
// As the CoroutineManager class is not thread safe, ensure that Kill()
// is executed on the main Godot thread.
diff --git a/src/Coroutines/Coroutine.cs b/src/Coroutines/Coroutine.cs
index 58df6d4..6a9a155 100644
--- a/src/Coroutines/Coroutine.cs
+++ b/src/Coroutines/Coroutine.cs
@@ -25,7 +25,7 @@ public Coroutine(Func creator)
this.routine = creator(this);
}
- public override void OnEnter()
+ protected override void OnEnter()
{
if (routine == null)
{
diff --git a/src/Coroutines/ParallelCoroutine.cs b/src/Coroutines/ParallelCoroutine.cs
index 6969f4f..bf0fadf 100644
--- a/src/Coroutines/ParallelCoroutine.cs
+++ b/src/Coroutines/ParallelCoroutine.cs
@@ -12,7 +12,7 @@ public ParallelCoroutine(params CoroutineBase[] coroutines)
this.coroutines = coroutines;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
if (coroutines.Length == 0)
{
diff --git a/src/Coroutines/RepeatCoroutine.cs b/src/Coroutines/RepeatCoroutine.cs
index c61c816..5a3576c 100644
--- a/src/Coroutines/RepeatCoroutine.cs
+++ b/src/Coroutines/RepeatCoroutine.cs
@@ -20,7 +20,7 @@ public RepeatCoroutine(int repeatTimes, Func cor
this.coroutineCreator = coroutineCreator;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
if (repeatTimes == 0)
{
diff --git a/src/Coroutines/SequentialCoroutine.cs b/src/Coroutines/SequentialCoroutine.cs
index 6f6d416..7d54115 100644
--- a/src/Coroutines/SequentialCoroutine.cs
+++ b/src/Coroutines/SequentialCoroutine.cs
@@ -14,7 +14,7 @@ public SequentialCoroutine(params CoroutineBase[] coroutines)
this.coroutines = coroutines;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
if (coroutines.Length == 0)
{
diff --git a/src/Coroutines/TweenCoroutine.cs b/src/Coroutines/TweenCoroutine.cs
index d0c5ec2..d60d59d 100644
--- a/src/Coroutines/TweenCoroutine.cs
+++ b/src/Coroutines/TweenCoroutine.cs
@@ -18,7 +18,7 @@ public TweenCoroutine(Func createTween)
this.createTween = createTween;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
tween = createTween();
@@ -30,7 +30,7 @@ public override void OnEnter()
tween.Finished += Kill;
}
- public override void OnExit()
+ protected override void OnExit()
{
tween.Kill();
}
diff --git a/src/Coroutines/WaitDelayCoroutine.cs b/src/Coroutines/WaitDelayCoroutine.cs
index e25a92e..2a239f2 100644
--- a/src/Coroutines/WaitDelayCoroutine.cs
+++ b/src/Coroutines/WaitDelayCoroutine.cs
@@ -12,7 +12,7 @@ public WaitDelayCoroutine(float delay)
this.delay = delay;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
Manager.GetTree().CreateTimer(delay).Timeout += Kill;
}
diff --git a/src/Coroutines/WaitForSignalCoroutine.cs b/src/Coroutines/WaitForSignalCoroutine.cs
index ed7b936..a185c2a 100644
--- a/src/Coroutines/WaitForSignalCoroutine.cs
+++ b/src/Coroutines/WaitForSignalCoroutine.cs
@@ -16,7 +16,7 @@ public WaitForSignalCoroutine(GodotObject obj, string signal)
this.targetSignal = signal;
}
- public override void OnEnter() {
+ protected override void OnEnter() {
Manager.ToSignal(targetObject, targetSignal).OnCompleted(Kill);
}
}
\ No newline at end of file
diff --git a/src/Coroutines/WaitUntilCoroutine.cs b/src/Coroutines/WaitUntilCoroutine.cs
index 228e4ae..be15667 100644
--- a/src/Coroutines/WaitUntilCoroutine.cs
+++ b/src/Coroutines/WaitUntilCoroutine.cs
@@ -14,7 +14,7 @@ public WaitUntilCoroutine(Func condition)
this.condition = condition;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
CheckCondition();
if (IsAlive) ResumeUpdates();
diff --git a/src/Coroutines/WaitWhileCoroutine.cs b/src/Coroutines/WaitWhileCoroutine.cs
index 1688925..d8ee07b 100644
--- a/src/Coroutines/WaitWhileCoroutine.cs
+++ b/src/Coroutines/WaitWhileCoroutine.cs
@@ -14,7 +14,7 @@ public WaitWhileCoroutine(Func condition)
this.condition = condition;
}
- public override void OnEnter()
+ protected override void OnEnter()
{
CheckCondition();
if (IsAlive) ResumeUpdates();