public ChunkBuilder AddSpace(Space spaceToAdd) { _spaces.Add(spaceToAdd); foreach (var bBuilder in _blockBuilders) { if (spaceToAdd.Contains(bBuilder.Position)) { bBuilder.SetSpace(spaceToAdd); } } OnChunkBuilderChanged.Raise(this); return(this); }
public void LogChange(WorldObjects.Spaces.Space current) { var extents = new List <IntVector2>(); foreach (var extent in current.Extents) { extents.Add(new IntVector2(extent)); } _history.Add(extents); _historyIndex = _history.Count - 1; _spaceName = current.Name; _drawColor = SpaceColorUtility.GetOutlineColor(current); gameObject.name = $"History for {current.Name}"; }