-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathIModule.cs
More file actions
20 lines (19 loc) · 1.11 KB
/
IModule.cs
File metadata and controls
20 lines (19 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System.Collections;
using System.Collections.Generic;
namespace RenderHeads.Tooling.Core.ModulePattern
{
/// <summary>
/// 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.
/// </summary>
public interface IModule
{/// <summary>
/// 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.
/// </summary>
/// <param name="delta">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</param>
void UpdateModule(float? deltaTime = null);
}
}