public static PlacedBlock Add(GameObject go, Placeable placeable, Placeable.Side side) { var placed = go.AddComponent <PlacedBlock>(); placed.Placeable = placeable; placed.SideSnapping = side; return(placed); }
protected void SetUpLogic() { Get = this; // fill map with empty blocks map = new Cell[xSize, ySize, zSize]; AirBlock = new Placeable("Empty air", allowsXZSnapping: true, allowsYSnapping: true, prefab: null, blockThickness: 1f, isTrigger: false, requiresSomeFoundation: false, canBePlacedAtZeroLevelWithoutFoundation: true, isFullBlock: false, maxLengthWithoutSupport: 0); Fill(AirBlock); }