Implement effect.

This commit is contained in:
2023-02-18 14:51:28 +08:00
parent 6bd32c9aef
commit 900bd7b77a
9 changed files with 194 additions and 7 deletions

View File

@@ -44,6 +44,7 @@ namespace Cryville.Crtr {
EventBus nbus;
InputProxy inputProxy;
Judge judge;
public static EffectManager effectManager;
bool started = false;
static bool initialized;
@@ -160,6 +161,8 @@ namespace Cryville.Crtr {
tbus.ForwardStepByTime(renderDist, step);
tbus.EndGraphicalUpdate();
UnityEngine.Profiling.Profiler.EndSample();
effectManager.Tick(cbus.Time);
}
catch (Exception ex) {
Game.LogException("Game", "An error occured while playing", ex);
@@ -496,6 +499,8 @@ namespace Cryville.Crtr {
if (tbus != null) { tbus.Dispose(); tbus = null; }
if (bbus != null) { bbus.Dispose(); bbus = null; }
if (cbus != null) { cbus.Dispose(); cbus.DisposeAll(); cbus = null; }
effectManager.Dispose();
effectManager = null;
etor = null;
Logger.Log("main", 1, "Game", "Stopped");
}
@@ -638,6 +643,7 @@ namespace Cryville.Crtr {
skin.LoadPdt(dir);
pskin = skin.Root;
pskin.Optimize(etor);
effectManager = new EffectManager(pskin);
}
#endregion
}