예제 #1
0
        public BlockShapeData GetShape(EBlockShapeType shapeType)
        {
            if (!_shapes.TryGetValue(shapeType, out var shape))
            {
                UnityEngine.Debug.LogError($"{this}: shape '{shapeType}' was not found");
            }

            return(shape);
        }
예제 #2
0
        public IBlockModel CreateBlock(EBlockShapeType shapeType, Vector3Int position, Quaternion rotation)
        {
            var shape = _blockShapeProvider.GetShape(shapeType);

            return(new BlockModel(shape, position, rotation));
        }