diff --git a/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/MoverModule.cs b/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/MoverModule.cs
index 4c99201..f451fd3 100644
--- a/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/MoverModule.cs
+++ b/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/MoverModule.cs
@@ -37,7 +37,7 @@ public void Stop()
{
_canMove = false;
}
- public void UpdateModule()
+ public void UpdateModule(float? deltaTime)
{
if (!_canMove)
{
diff --git a/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/SpawnerModule.cs b/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/SpawnerModule.cs
index 877590e..3fdfebc 100644
--- a/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/SpawnerModule.cs
+++ b/Assets/RenderHeads/ModulePatternSample/Scripts/Modules/SpawnerModule.cs
@@ -75,7 +75,7 @@ public void Stop()
_canSpawn = false;
}
- public void UpdateModule()
+ public void UpdateModule(float? deltaTime)
{
if (!_canSpawn)
{
diff --git a/Packages/RH.ModulePattern/Runtime/IModule.cs b/Packages/RH.ModulePattern/Runtime/IModule.cs
index b180ebc..e6ef8d1 100644
--- a/Packages/RH.ModulePattern/Runtime/IModule.cs
+++ b/Packages/RH.ModulePattern/Runtime/IModule.cs
@@ -1,20 +1,20 @@
-//(C) RenderHeads PTY LTD 2021
-//Author: Ross Borchers
+using System.Collections;
+using System.Collections.Generic;
namespace RenderHeads.Tooling.Core.ModulePattern
{
- ///
- /// Base interface for all modules, IModuleFactory requires modules inherit from this.
- /// General module usage pattern is:
- /// RAII. All initialization is done through the constructor. After a constructor is run the module should be fully usable.
- /// UpdateModules should be called at regular intervals. The order of module updates should be controlled by the caller to ensure all dependencies have already been updated.
- /// Pass in dependencies through the constructor IOC like.
- ///
+ ///
+ /// Base interface for all modules, IModuleFactory requires modules inherit from this.
+ /// General module usage pattern is:
+ /// RAII. All initialization is done through the constructor. After a constructor is run the module should be fully usable.
+ /// UpdateModules should be called at regular intervals. The order of module updates should be controlled by the caller to ensure all dependencies have already been updated.
+ /// Pass in dependencies through the constructor IOC like.
+ ///
public interface IModule
- {
- ///
- /// Should be called at a regular interval. The order of module updates should be controlled by the caller to ensure all dependencies have already been updated.
- ///
- void UpdateModule();
- }
-}
\ No newline at end of file
+ {///
+ /// Should be called at a regular interval. The order of module updates should be controlled by the caller to ensure all dependencies have already been updated.
+ ///
+ /// Pass in a deltaTime calculated in parent update, if you want to pass that into underlying update event, so thay you don't need to query it within the method
+ void UpdateModule(float? deltaTime = null);
+ }
+}