SEToolbox.Models.CubeItemModel.CreateCube C# (CSharp) Method

CreateCube() public method

public CreateCube ( MyObjectBuilderType typeId, string subTypeId, MyCubeBlockDefinition definition ) : Sandbox.Common.ObjectBuilders.MyObjectBuilder_CubeBlock
typeId MyObjectBuilderType
subTypeId string
definition MyCubeBlockDefinition
return Sandbox.Common.ObjectBuilders.MyObjectBuilder_CubeBlock
        public MyObjectBuilder_CubeBlock CreateCube(MyObjectBuilderType typeId, string subTypeId, MyCubeBlockDefinition definition)
        {
            var newCube = SpaceEngineersCore.Resources.CreateNewObject<MyObjectBuilder_CubeBlock>(typeId, subTypeId);
            newCube.BlockOrientation = Cube.BlockOrientation;
            newCube.ColorMaskHSV = Cube.ColorMaskHSV;
            newCube.BuildPercent = Cube.BuildPercent;
            newCube.EntityId = Cube.EntityId;
            newCube.IntegrityPercent = Cube.IntegrityPercent;
            newCube.Min = Cube.Min;

            SetProperties(newCube, definition);

            return newCube;
        }