Started boss wave and iniital assets; broke out parallax speed change
functionality.
This commit is contained in:
parent
4f0eff986f
commit
59d42fb906
9 changed files with 110 additions and 16 deletions
|
|
@ -16,6 +16,7 @@ const CRT = preload("res://scenes/enemy_CRT.tscn")
|
|||
const MIRROR = preload("res://scenes/enemy_mirror.tscn")
|
||||
const SHARDS = preload("res://scenes/enemy_shards.tscn")
|
||||
const TABLE = preload("res://scenes/enemy_table.tscn")
|
||||
const BOSS = preload("res://scenes/boss.tscn")
|
||||
|
||||
func _ready():
|
||||
wave_count = 0
|
||||
|
|
@ -24,7 +25,7 @@ func _ready():
|
|||
|
||||
func spawn_enemies():
|
||||
|
||||
if wave_count == 1: #This is for CHICKENS
|
||||
if wave_count == 3: #This is for CHICKENS
|
||||
print("Enemy Wave: ", wave_count)
|
||||
enemy = CHICKEN
|
||||
for x in range(COLS):
|
||||
|
|
@ -37,7 +38,7 @@ func spawn_enemies():
|
|||
await get_tree().process_frame
|
||||
print_debug("Remaining enemies: ", enemy_count, ", ", get_tree().get_nodes_in_group("enemies").size())
|
||||
|
||||
if wave_count == 0: #This is for CRTs
|
||||
if wave_count == 2: #This is for CRTs
|
||||
print("Enemy Wave: ", wave_count)
|
||||
enemy = CRT
|
||||
var cols_mod = COLS - 1
|
||||
|
|
@ -52,7 +53,7 @@ func spawn_enemies():
|
|||
enemy_count = rows_mod * cols_mod
|
||||
await get_tree().process_frame
|
||||
|
||||
if wave_count == 2: #This if for Mirror
|
||||
if wave_count == 1: #This if for Mirror
|
||||
print("Enemy Wave: ", wave_count)
|
||||
|
||||
# Spawn Table
|
||||
|
|
@ -88,6 +89,18 @@ func spawn_enemies():
|
|||
s.start_all_animations()
|
||||
|
||||
|
||||
if wave_count == 0: #This is for Boss
|
||||
|
||||
|
||||
# Speed up parallax
|
||||
EventBus.cloud_speed.emit()
|
||||
|
||||
# Spawn Boss
|
||||
EventBus.flash_screen.emit(.25)
|
||||
var b = BOSS.instantiate()
|
||||
add_child(b)
|
||||
b.position = Vector2(screensize.x / 2, position.y + 100)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue