JHRGB/maps/sections.gd
2023-12-04 19:42:47 +00:00

26 lines
778 B
GDScript

var root
func create_map(root):
self.root=root
poolcircle(Vector2(0,0),200,32,100,0,0)
poolcircle(Vector2(600,0),200,32,0,100,0)
poolcircle(Vector2(1200,0),200,32,0,0,100)
poolcircle(Vector2(0,600),200,32,0,50,50)
poolcircle(Vector2(600,600),200,32,50,0,50)
poolcircle(Vector2(1200,600),200,32,50,50,0)
poolcircle(Vector2(600,200),2000,100,1000,1000,1000)
func poolcircle(pos: Vector2, radius, count, r,g,b):
for n in range(1,count+1):
var new_pool: Pool = load("res://pool.tscn").instantiate()
var t=(float(n)/count)*3.141*2
new_pool.position = pos + (Vector2(sin(t),cos(t))*radius)
new_pool.mana_r=r
new_pool.mana_g=g
new_pool.mana_b=b
new_pool.get_node("StaticBody2D/CollisionShape2D2").disabled=true;
root.call_deferred("add_child",new_pool)