public void Init(Player _Player, EBrushType _Type) { m_Type = _Type; SetColor(_Player.m_Color); m_MovingEffect.Init(_Player); if (_Type == EBrushType.MAIN) { m_Arrow.SetActive(true); } }
internal void setFillPattern(FillPattern fillPattern) { mForeground = fillPattern.mForeground; mBackground = fillPattern.mBackground; mBrushType = fillPattern.mBrushType; }
public FillPattern(Color black) { mBackground = Color.Transparent; mForeground = black; mBrushType = EBrushType.Solid; }
public FillPattern() { mBackground = Color.Transparent; mForeground = MyColor.DEFAULT_SHAPE_FILL_COLOR; mBrushType = EBrushType.Solid; }
public FillPattern(EBrushType brushType, Color foregroundColor, Color backgroundColor) { this.mBrushType = brushType; mForeground = foregroundColor; mBackground = backgroundColor; }
public void setFillPattern(int index) { mBrushType = (EBrushType)index; }
/// <summary> /// Creates the specific brush. /// </summary> public static BSBrush CreateBrush(EBrushType type) { if (Self == null) { Debug.LogError("Building manipulator"); return(null); } if (type == Self.m_BrushType) { return(Self.m_ActiveBrush); } if (Self.m_ActiveBrush != null) { Destroy(Self.m_ActiveBrush.gameObject); } BSBrush brush = null; switch (type) { case EBrushType.Point: brush = BSBrush.Create <BSPointBrush>(Self.brushPrefabs.pointBrush, Self.brushGroup.transform); break; case EBrushType.Box: brush = BSBrush.Create <BSBoxBrush>(Self.brushPrefabs.boxBrush, Self.brushGroup.transform); break; case EBrushType.Select: brush = BSBrush.Create <BSMiscBrush>(Self.brushPrefabs.SelectBrush, Self.brushGroup.transform); break; case EBrushType.Iso: brush = BSBrush.Create <BSIsoBrush>(Self.brushPrefabs.IsoBrush, Self.brushGroup.transform); break; case EBrushType.B45Diagonal: brush = BSBrush.Create <BSB45DiagonalBrush>(Self.brushPrefabs.diagonalBrush, Self.brushGroup.transform); break; case EBrushType.IsoSelectBrush: brush = BSBrush.Create <BSIsoSelectBrush>(Self.brushPrefabs.IsoSelectBrush, Self.brushGroup.transform); break; default: break; } Self.m_BrushType = type; if (brush == null) { return(null); } Self.m_ActiveBrush = brush; brush.pattern = Self.pattern; brush.dataSource = Self.m_ActiveData; Self.voxelIndicator.minVol = brush.minvol; if (Self.onCreateBrush != null) { Self.onCreateBrush(brush, type); } return(brush); }