finish new maps

This commit is contained in:
James
2023-12-04 19:42:47 +00:00
parent b0d7acdbba
commit 92cafad56a
7 changed files with 56 additions and 112 deletions

16
maps/large.gd Normal file
View File

@@ -0,0 +1,16 @@
var root
func create_map(_root):
root=_root
poolcircle(Vector2(0,0),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)

18
maps/rare.gd Normal file
View File

@@ -0,0 +1,18 @@
var root
func create_map(_root):
self.root=_root
poolcircle(Vector2(0,0),0,1,10,0,0)
poolcircle(Vector2(0,0),2000,100,0,5000,0)
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)

View File

@@ -2,7 +2,6 @@ var root
func create_map(root):
self.root=root
pass # Replace with function body.
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)
@@ -13,15 +12,11 @@ func create_map(root):
poolcircle(Vector2(600,200),2000,100,1000,1000,1000)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
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
print(t)
new_pool.position = pos + (Vector2(sin(t),cos(t))*radius)
new_pool.mana_r=r
new_pool.mana_g=g

View File

@@ -1,15 +1,13 @@
var root
# Called when the node enters the scene tree for the first time.
func create_map(_root):
root=_root
poolcircle(Vector2(0,0),2000,100,1000,1000,1000)
poolcircle(Vector2(0,0),200,16,100,100,100)
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
print(t)
new_pool.position = pos + (Vector2(sin(t),cos(t))*radius)
new_pool.mana_r=r
new_pool.mana_g=g