Skip to content

Commit

Permalink
Improve event naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Inspiaaa committed Aug 30, 2023
1 parent 943b692 commit 2bc3e0b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/CoroutineBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void PauseUpdates()
manager.DeactivateCoroutine(this);
}

public virtual void OnChildStop(CoroutineBase child)
public virtual void OnChildStopped(CoroutineBase child)
{
// If the parent coroutine is dead, then there is no reason to
// manually remove the child coroutines
Expand Down Expand Up @@ -109,7 +109,7 @@ public void Kill()
child = child.nextSibling;
}

stopListener?.OnChildStop(this);
stopListener?.OnChildStopped(this);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Coroutines/Coroutine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public override void Update()
}
}

public override void OnChildStop(CoroutineBase child)
public override void OnChildStopped(CoroutineBase child)
{
base.OnChildStop(child);
base.OnChildStopped(child);
ResumeUpdates();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Coroutines/ParallelCoroutine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public override void OnEnter()
}
}

public override void OnChildStop(CoroutineBase child)
public override void OnChildStopped(CoroutineBase child)
{
base.OnChildStop(child);
base.OnChildStopped(child);

// If there are no more actively running coroutines, stop.
if (firstChild == null)
Expand Down
4 changes: 2 additions & 2 deletions src/Coroutines/RepeatCoroutine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ private void Repeat()
StartCoroutine(coroutine);
}

public override void OnChildStop(CoroutineBase child)
public override void OnChildStopped(CoroutineBase child)
{
base.OnChildStop(child);
base.OnChildStopped(child);

if (!IsInfinite && currentRepeatCount > repeatTimes)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Coroutines/SequentialCoroutine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public override void OnEnter()
StartCoroutine(coroutines[0]);
}

public override void OnChildStop(CoroutineBase child)
public override void OnChildStopped(CoroutineBase child)
{
base.OnChildStop(child);
base.OnChildStopped(child);

idx += 1;
if (idx < coroutines.Length)
Expand Down
2 changes: 1 addition & 1 deletion src/ICoroutineStopListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace HCoroutines
{
public interface ICoroutineStopListener
{
void OnChildStop(CoroutineBase coroutine);
void OnChildStopped(CoroutineBase coroutine);
}
}

0 comments on commit 2bc3e0b

Please sign in to comment.