2021-02-19 15:06:00 +08:00
|
|
|
using System;
|
|
|
|
namespace Strawberry
|
|
|
|
{
|
|
|
|
static public class Engine
|
|
|
|
{
|
|
|
|
static public void Run(Module module)
|
|
|
|
{
|
|
|
|
Startup();
|
|
|
|
|
2021-02-21 11:13:31 +08:00
|
|
|
Module currentModule = module;
|
|
|
|
while (currentModule != null)
|
2021-02-19 15:06:00 +08:00
|
|
|
{
|
2021-02-21 11:13:31 +08:00
|
|
|
let newModule = currentModule.[Friend]Run();
|
|
|
|
currentModule = newModule;
|
2021-02-19 15:06:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
Shutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
static private void Startup()
|
|
|
|
{
|
|
|
|
Input.[Friend]Startup();
|
|
|
|
Tracker.[Friend]BuildAssignmentLists();
|
|
|
|
}
|
|
|
|
|
|
|
|
static private void Shutdown()
|
|
|
|
{
|
|
|
|
Input.[Friend]Shutdown();
|
2021-02-22 04:48:53 +08:00
|
|
|
Sprite.[Friend]Dispose();
|
2021-02-19 15:06:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|