Implement input config scene loading and saving.
This commit is contained in:
@@ -8,7 +8,7 @@ using UnityEngine;
|
||||
using Logger = Cryville.Common.Logger;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
public class InputProxy {
|
||||
public class InputProxy : IDisposable {
|
||||
readonly PdtEvaluator _etor;
|
||||
readonly PdtRuleset _ruleset;
|
||||
readonly Judge _judge;
|
||||
@@ -148,6 +148,22 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
public void Deactivate() { foreach (var src in _sproxies.Keys) src.Handler.Deactivate(); }
|
||||
|
||||
~InputProxy() {
|
||||
Dispose(false);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
public void Dispose() {
|
||||
Dispose(true);
|
||||
}
|
||||
protected void Dispose(bool disposing) {
|
||||
if (disposing) {
|
||||
Deactivate();
|
||||
foreach (var proxy in _tproxies.Values) {
|
||||
proxy.Source.Value.Handler.OnInput -= OnInput;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly object _lock = new object();
|
||||
static readonly int _var_value = IdentifierManager.SharedInstance.Request("value");
|
||||
static readonly PropOp.Arbitrary _arbop = new PropOp.Arbitrary();
|
||||
|
Reference in New Issue
Block a user