public override void onEnabled() { GameObject controllerPrefabGO = new GameObject(); _controllerPrefab = controllerPrefabGO.AddComponent <MoreRealismController>(); _controllerPrefab.SetAsPrefab(); AssetManager.Instance.registerObject(_controllerPrefab); _controllerGO = new GameObject(); MoreRealismController.Instance = _controllerGO.AddComponent <MoreRealismController>(); EventManager.Instance.OnStartPlayingPark += MoreRealismController.Instance.Load; }
public override void deserialize(SerializationContext context, Dictionary <string, object> values) { if (_prefabFlag) { return; } settings = new MoreRealismSettings(); settings.deserialize(context, values); base.deserialize(context, values); Instance.Kill(); Instance = this; EventManager.Instance.OnStartPlayingPark += Instance.Load; }
public BaseWindow(MoreRealismController controller) { _id = IdGenerator.GetId(); Controller = controller; }