Preliminary port of DataLogger. Parts of the GUI are definitely broken, but the file writes.
[VOID.git] / VOID_Core.cs
blob:a/VOID_Core.cs -> blob:b/VOID_Core.cs
--- a/VOID_Core.cs
+++ b/VOID_Core.cs
@@ -286,9 +286,9 @@
 					module.StopGUI();
 				}
 
-				if (typeof(VOID_BehaviorModule).IsAssignableFrom(module.GetType()))
-				{
-					((VOID_BehaviorModule)module).Update();
+				if (module is IVOID_BehaviorModule)
+				{
+					((IVOID_BehaviorModule)module).Update();
 				}
 			}
 
@@ -318,7 +318,8 @@
 				}
 			}
 
-			foreach (VOID_BehaviorModule module in this._modules.OfType<VOID_BehaviorModule>().Where(m => !m.GetType().IsAbstract))
+			foreach (IVOID_BehaviorModule module in
+			         this._modules.OfType<IVOID_BehaviorModule>().Where(m => !m.GetType().IsAbstract))
 			{
 				module.FixedUpdate();
 			}