Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Update()

void ReLogic.Peripherals.RGB.ChromaEngine.Update ( float totalTime)
inline

Definition at line 175 of file ChromaEngine.cs.

176 {
177 if (_deviceGroups.Count == 0)
178 {
179 return;
180 }
181 if (totalTime < _lastTime)
182 {
183 _lastTime = totalTime;
184 }
185 float num = totalTime - _lastTime;
187 {
188 return;
189 }
190 try
191 {
192 if (this.OnUpdate != null)
193 {
194 this.OnUpdate(this, new ChromaEngineUpdateEventArgs(num));
195 }
196 _hotkeys.UpdateAll(num);
198 _lastTime = totalTime;
200 {
201 ((ChromaEngine)context).Draw();
202 }, this);
203 }
204 catch
205 {
207 }
208 finally
209 {
211 }
212 }
readonly HotkeyCollection _hotkeys
EventHandler< ChromaEngineUpdateEventArgs > OnUpdate
readonly Dictionary< string, RgbDeviceGroup > _deviceGroups
readonly ShaderSelector _shaderSelector
static void Exit(object obj)
static bool TryEnter(object obj)
Definition Monitor.cs:36
static bool QueueUserWorkItem(WaitCallback callBack)

References ReLogic.Peripherals.RGB.ChromaEngine.ChromaEngine(), ReLogic.Peripherals.RGB.ChromaEngine._deviceGroups, ReLogic.Peripherals.RGB.ChromaEngine._hotkeys, ReLogic.Peripherals.RGB.ChromaEngine._lastTime, ReLogic.Peripherals.RGB.ChromaEngine._shaderSelector, ReLogic.Peripherals.RGB.ChromaEngine._updateLock, System.Collections.Generic.Dictionary< TKey, TValue >.Count, ReLogic.Peripherals.RGB.ChromaEngine.DisableAllDeviceGroups(), System.Threading.Monitor.Exit(), ReLogic.Peripherals.RGB.ChromaEngine.FrameTimeInSeconds, ReLogic.Peripherals.RGB.ChromaEngine.OnUpdate, System.Threading.ThreadPool.QueueUserWorkItem(), System.Threading.Monitor.TryEnter(), ReLogic.Peripherals.RGB.ShaderSelector.Update(), and ReLogic.Peripherals.RGB.HotkeyCollection.UpdateAll().