Example #1
0
        public void Unload()
        {
            _script.Release();
            _script = null;

            _isReleased = true;

            _view = null;
        }
Example #2
0
        void InitMap()
        {
            if (battleEngine.Map != null)
            {
                GameMap map = battleEngine.Map;

                GameObject prefab = Resources.Load <GameObject>(map.Data["Prefab"].StringValue);
                GameObject go     = Instantiate <GameObject>(prefab);
                go.name = "map";
                go.transform.SetParent(Root);
                _mapView = go.EnsureComponent <GameMapView>();
                _mapView.Bind(map);
            }
        }