示例#1
0
        public static PlacedBlock Add(GameObject go, Placeable placeable, Placeable.Side side)
        {
            var placed = go.AddComponent <PlacedBlock>();

            placed.Placeable    = placeable;
            placed.SideSnapping = side;
            return(placed);
        }
示例#2
0
        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);
        }