TeaseAI_CE.Scripting.Controller.Tick C# (CSharp) Method

Tick() public method

public Tick ( ) : void
return void
		public void Tick()
		{
			if (personality == null || personality.Enabled == false)
				return;

			// Wait for all events to finish.
			while (events.Count > 0)
			{
				if (!events.Peek().Finished())
					return;
				events.Dequeue();
			}

			while (next(output) && output.Length == 0)
			{ }

			events.Enqueue(new Timed(new TimeSpan(0, 0, 0, 0, output.Length * 80), false, () =>
			{
				OnOutput?.Invoke(personality, output.ToString());
				output.Clear();
			}));
		}