Example #1
0
    /**
     *  @brief  Generator 객체 생성
     */
    private void OnEnable()
    {
        if (genPlanet == null)
        {
            genPlanet = VoxelPlanetGenerator.GetPlanetGenerator();
        }

        if (genTerrainInfo == null)
        {
            genTerrainInfo = new TerrainInfo();
        }
        if (genCloudInfo == null)
        {
            genCloudInfo = new CloudInfo();
        }

        if (fillArea == null)
        {
            fillArea = new FillArea();
        }
        if (noiseArea == null)
        {
            noiseArea = new NoiseArea();
        }
    }
        public IDrawing CreateObject(string c)
        {
            IDrawing drawing = null;

            if (!Enum.TryParse(c, out CommandEnum command))
            {
                return(drawing);
            }
            else
            {
                if (command == CommandEnum.C)
                {
                    drawing = new CreateCanvas();
                }
                else if (command == CommandEnum.L)
                {
                    drawing = new CreateNewLine();
                }
                else if (command == CommandEnum.R)
                {
                    drawing = new CreateRectangle();
                }
                else if (command == CommandEnum.B)
                {
                    drawing = new FillArea();
                }
            }

            return(drawing);
        }
Example #3
0
 public void AddFillRectangle(FillArea rect)
 {
     if (!FillRectExists(rect))
     {
         HttpDataClient.Default.AddFillRectangle(rect);
         //HttpDataAccess.AddFillRectangle(rect);
     }
 }
Example #4
0
 /// <summary>
 /// Serves as a hash of this type.
 /// </summary>
 /// <returns>A hash code for the current instance.</returns>
 public override int GetHashCode()
 {
     return
         (Width.GetHashCode() ^
          Height.GetHashCode() ^
          X.GetHashCode() ^
          Y.GetHashCode() ^
          IsPercentage.GetHashCode() ^
          IgnoreAspectRatio.GetHashCode() ^
          Less.GetHashCode() ^
          Greater.GetHashCode() ^
          FillArea.GetHashCode() ^
          LimitPixels.GetHashCode());
 }
Example #5
0
 public void UpdateFillRectangle(FillArea area)
 {
 }
Example #6
0
 public bool FillRectExists(FillArea area)
 {
     return(FillRectExists(new FillArea[] { area }).FirstOrDefault());
 }
Example #7
0
 public FillArea(FillArea copyThis) : base(copyThis)
 {
     this.blockType = copyThis.blockType;
 }