// Functions public void Start(IEnumerator fiber, FCoroutineStopCondition stopCondition, object owner, string ownerName, float startTime, FAddRoutine.Event add, FRemoveRoutine.Event remove, byte routineType) { Fiber = fiber; stopCondition.CopyTo(stopCondition); Owner.Set(owner); OwnerName = ownerName; StartTime = startTime; Add.Bind(add); Remove.Bind(remove); RoutineType = routineType; if (Owner.IsValid()) { Add.Execute(this); } }
public void Start(IEnumerator fiber, FCoroutineStopCondition stopCondition, object owner, string ownerName, float startTime) { Start(fiber, stopCondition, owner, ownerName, startTime, null, null, INVALID_TYPE); }
// Constructor public FCgRoutine(int index, FECgCoroutineSchedule schedule, InsertRoutineAheadOf insertRoutine) { Index = index; Schedule = schedule; Prev = null; Next = null; State = ECgRoutineState.Free; Fiber = null; Name = ""; RoutineType = INVALID_TYPE; bWaitingFor = false; WaitingFor = null; Blocking = null; InsertRoutine = insertRoutine; Parent = null; Children = new List <FCgRoutine>(); Owner = new FCgAttribute(); OwnerName = ""; StopCondition = new FCoroutineStopCondition(); StopMessages = new List <string>(); Messages_Recieved = new Dictionary <ECgCoroutineMessage, List <string> >(new ECgCoroutineMessageEqualityComparer()); for (byte i = 0; i < (byte)ECgCoroutineMessage.MAX; ++i) { Messages_Recieved[(ECgCoroutineMessage)i] = new List <string>(); } Add = new FAddRoutine(); Remove = new FRemoveRoutine(); StartTime = 0.0f; ElapsedTime = 0.0f; DeltaTime = 0.0f; TickCount = 0; Delay = 0.0f; bWaitForFrame = false; WaitForFrameCounter = 0; WaitForFrame = 0; WaitForFrameType = null; bWaitForTime = false; WaitForTime = 0.0f; WaitForTimeTimer = 0.0f; WaitForTimeType = null; bWaitForFlag = false; WaitForBoolType = null; WaitForFlagType = null; bWaitForListenMessage = false; WaitForListenMessage = INVALID_LISTEN_MESSAGE; WaitForListenMessageType = null; EndReason = ECgCoroutineEndReason.MAX; Ints = new int[INT_SIZE]; Floats = new float[FLOAT_SIZE]; }