Exemplo n.º 1
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);
            }
        }