21 lines
821 B
GDScript
21 lines
821 B
GDScript
extends Node2D
|
|
|
|
var soil := Color("615b45")
|
|
|
|
func _draw() -> void:
|
|
# A small irregular worn footprint, with feathered edges instead of a ground tile.
|
|
for layer in range(5,0,-1):
|
|
var points := PackedVector2Array()
|
|
for index in 40:
|
|
var angle := TAU*index/40.0
|
|
var irregular := 1.0+0.055*sin(angle*7.0)+0.035*cos(angle*11.0)
|
|
points.append(Vector2(cos(angle)*49.0,sin(angle)*29.0)*irregular*(0.85+layer*0.045)+Vector2(0,17))
|
|
draw_colored_polygon(points,Color(soil,0.04))
|
|
# Short soft contact shadow beneath the building's foundation.
|
|
for layer in range(4,0,-1):
|
|
var points := PackedVector2Array()
|
|
for index in 40:
|
|
var angle := TAU*index/40.0
|
|
points.append(Vector2(cos(angle)*(37.0+layer*1.6),sin(angle)*(16.0+layer*1.2))+Vector2(4,21))
|
|
draw_colored_polygon(points,Color(0.04,0.045,0.03,0.055))
|