VoxelStencil.Initialize C# (CSharp) Method

Initialize() public method

public Initialize ( bool fillType, int radius ) : void
fillType bool
radius int
return void
	public virtual void Initialize (bool fillType, int radius) {
		this.fillType = fillType;
		this.radius = radius;
	}

Usage Example

Example #1
0
    private void SetupStencil(bool isBreaking)
    {
        activeStencil = stencils[stencilIndex];

        if (worldManager.creativeMode)
        {
            activeStencil.Initialize(fillTypeIndex, radiusIndex);
        }
        else
        {
            var fillType = 0;
            var blocks   = BlockManager.Read().blocks;

            for (int i = 0; i < blocks.Count; i++)
            {
                if (isBreaking)
                {
                    fillType = 0;
                    break;
                }
                if (uiHotBar.currentItem != null && blocks[i].blockType.ToString() == uiHotBar.currentItem.itemType.ToString())
                {
                    fillType = i;
                    break;
                }
            }

            activeStencil.Initialize(fillType, radiusIndex);
        }
    }
All Usage Examples Of VoxelStencil::Initialize