示例#1
0
        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;
        }
示例#2
0
        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;
        }
示例#3
0
 public BaseWindow(MoreRealismController controller)
 {
     _id        = IdGenerator.GetId();
     Controller = controller;
 }