Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Diagnostics;
- public class CoroutineEx
- {
- protected string name = string.Empty;
- protected bool mustStop;
- protected bool isStoppeable;
- protected bool isExclusive;
- protected bool hasFinished;
- public string Name
- {
- get { return this.name; }
- }
- public bool IsStoppeable
- {
- get { return this.isStoppeable; }
- }
- public bool IsExclusive
- {
- get { return this.isExclusive; }
- }
- public bool HasFinished
- {
- get { return this.hasFinished; }
- }
- public CoroutineEx(string name, bool isStoppeable, bool isExclusive)
- {
- this.name = name;
- this.isStoppeable = isStoppeable;
- this.isExclusive = isExclusive;
- }
- [DebuggerHidden]
- public virtual IEnumerator Run()
- {
- return new CoroutineEx.<Run>c__IteratorB();
- }
- public virtual void CleanUp() { }
- public virtual void Stop()
- {
- if (this.isStoppeable)
- this.mustStop = true;
- }
- public virtual void Finished()
- {
- this.hasFinished = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement