コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        public override void Initialize()
        {
            _graph = _tileGraph.Graph;
            _verts = _tileGraph.VertexObjects;

            _map   = _tileSet.CreateMap();
            _model = TileModel.CreateFromGraph(_map, _graph, _seed);

            _model.DomainChanged += OnDomainChanged;
            _status = CollapseStatus.Incomplete;

            _initializer = GetComponent <TileModelInitializer>();
            _initializer?.Initialize(_model);
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        public override void Initialize()
        {
            _counter = GetComponent <TileTypeCounter>();

            _graph = _tileGraph.Graph;
            _verts = _tileGraph.VertexObjects;

            _map   = _tileSet.CreateMap();
            _model = TileModel.CreateFromGraph(_map, _graph, _seed);

            _model.DomainChanged += OnDomainChanged;
            _status = CollapseStatus.Incomplete;

            var selector = GetComponent <ITileSelector>();

            if (selector != null)
            {
                _model.Selector = selector;
            }

            _initializer = GetComponent <TileModelInitializer>();
            _initializer?.Initialize(_model);
        }