public void ApplyHeights(int offsetX, int offsetY, SetHeight f)
    {
        int offset = (resolution - (radius * 2)) / 2;

        for (int x = 0; x <= (radius * 2); x++)
        {
            for (int y = 0; y <= (radius * 2); y++)
            {
                // Avoid the 'corners'
//				Vector2 pos = new Vector2 (x, y);
//				float distance = Mathf.Abs (Vector2.Distance (pos, peak));
//				if (distance > (float)radius) continue;
                f(offsetX + x, offsetY + y, heights[x + offset, y + offset]);
            }
        }
    }
示例#2
0
 public void AskInputHeight(string text)
 {
     Console.WriteLine(text);
     SetHeight?.Invoke(this, new EventArgs());
 }