public void Reset() { Prev = null; Next = null; State = ECgRoutineState.Free; Fiber = null; Name = ""; RoutineType = INVALID_TYPE; WaitingFor = null; Blocking = null; Parent = null; Children.Clear(); Owner.UnSet(); OwnerName = ""; StopCondition.Clear(); StopMessages.Clear(); for (byte i = 0; i < (byte)ECgCoroutineMessage.MAX; ++i) { Messages_Recieved[(ECgCoroutineMessage)i].Clear(); } Add.Unbind(); Remove.Unbind(); StartTime = 0.0f; ElapsedTime = 0.0f; DeltaTime = 0.0f; TickCount = 0; Delay = 0.0f; bWaitForFrame = false; WaitForFrameCounter = 0; WaitForFrame = 0; WaitForFrameType = null; bWaitForTime = false; WaitForTimeTimer = 0.0f; WaitForTime = 0.0f; WaitForTimeType = null; bWaitForFlag = false; WaitForBoolType = null; WaitForFlagType = null; bWaitForListenMessage = false; WaitForListenMessage = INVALID_LISTEN_MESSAGE; WaitForListenMessageType = null; EndReason = ECgCoroutineEndReason.MAX; for (byte i = 0; i < INT_SIZE; ++i) { Ints[i] = 0; } for (byte i = 0; i < FLOAT_SIZE; ++i) { Floats[i] = 0.0f; } }
public void End(ECgCoroutineEndReason endReason) { if (Owner.IsValid()) { Remove.Execute(this); } // EndChildren(); EndReason = endReason; State = ECgRoutineState.End; }
// 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]; }