|
@ -7,9 +7,12 @@ var deltaSpawnTime = 1 |
|
|
|
|
|
|
|
|
func _process(delta): |
|
|
func _process(delta): |
|
|
spawnTime = 500/get_viewport_rect().size.x * deltaSpawnTime |
|
|
spawnTime = 500/get_viewport_rect().size.x * deltaSpawnTime |
|
|
|
|
|
print(spawnTime) |
|
|
|
|
|
print(get_viewport_rect().size.x) |
|
|
time += delta |
|
|
time += delta |
|
|
if time > spawnTime: |
|
|
if time > spawnTime: |
|
|
time = 0 |
|
|
time = 0 |
|
|
|
|
|
if spawnTime > 300/get_viewport_rect().size.x: |
|
|
deltaSpawnTime *= 0.995 |
|
|
deltaSpawnTime *= 0.995 |
|
|
if has_node("Rocket"): |
|
|
if has_node("Rocket"): |
|
|
var asteroid = asteroidObj.instance() |
|
|
var asteroid = asteroidObj.instance() |
|
|