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
scenes/boss.tscn
Normal file
16
scenes/boss.tscn
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[gd_scene format=3 uid="uid://bg5fq6ltr37r5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c7gbcrellomr1" path="res://sprites/boss.png" id="1_dlmty"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_neq0i"]
|
||||
size = Vector2(129, 63)
|
||||
|
||||
[node name="Boss" type="Area2D" unique_id=2108172712]
|
||||
z_index = -1
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=523151470]
|
||||
texture = ExtResource("1_dlmty")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=12560305]
|
||||
position = Vector2(-0.5, 1.5)
|
||||
shape = SubResource("RectangleShape2D_neq0i")
|
||||
|
|
@ -13,5 +13,6 @@ signal goose_talk(frame_index: int)
|
|||
|
||||
# FX
|
||||
signal flash_screen(duration: float)
|
||||
signal cloud_speed()
|
||||
|
||||
@warning_ignore_restore("unused_signal") # put any future signals you add between the two ignore annotations
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene format=3 uid="uid://cc2dnhuv4qx7m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c51huloycn5as" path="res://scenes/main.gd" id="1_h2yge"]
|
||||
[ext_resource type="PackedScene" uid="uid://tlcdxoupi2lb" path="res://scenes/parallax_starfield.tscn" id="2_5vw27"]
|
||||
[ext_resource type="PackedScene" uid="uid://tlcdxoupi2lb" path="res://scenes/parallax_clouds.tscn" id="2_5vw27"]
|
||||
[ext_resource type="Texture2D" uid="uid://b25w6ms7bxlhu" path="res://sprites/third space bgrnd.png" id="3_tipki"]
|
||||
[ext_resource type="PackedScene" uid="uid://s6wf3egdqtmh" path="res://scenes/ui.tscn" id="4_1bvp3"]
|
||||
[ext_resource type="Shader" uid="uid://x02irwg8ynvp" path="res://shaders/pixel_highlight.gdshader" id="4_272bh"]
|
||||
|
|
@ -70,7 +70,7 @@ shader_parameter/intensity = 1.0
|
|||
[node name="Main" type="Node2D" unique_id=128010797]
|
||||
script = ExtResource("1_h2yge")
|
||||
|
||||
[node name="Parallax Starfield" parent="." unique_id=571002326 instance=ExtResource("2_5vw27")]
|
||||
[node name="ParallaxClouds" parent="." unique_id=571002326 instance=ExtResource("2_5vw27")]
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=122041916]
|
||||
libraries/ = SubResource("AnimationLibrary_lquwl")
|
||||
|
|
|
|||
17
scenes/parallax_clouds.gd
Normal file
17
scenes/parallax_clouds.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
extends Node2D
|
||||
|
||||
var scroll_multiplier: float = 200
|
||||
|
||||
@onready var parallax_nodes = get_tree().get_nodes_in_group("parallax_clouds")
|
||||
|
||||
func _ready():
|
||||
EventBus.cloud_speed.connect(_on_cloud_speed)
|
||||
|
||||
func _on_cloud_speed():
|
||||
$CoffeeBuoy.hide()
|
||||
for node in parallax_nodes:
|
||||
if node is Parallax2D:
|
||||
var current_autoscroll = node.get_autoscroll()
|
||||
current_autoscroll.y += scroll_multiplier
|
||||
node.set_autoscroll(current_autoscroll)
|
||||
|
||||
1
scenes/parallax_clouds.gd.uid
Normal file
1
scenes/parallax_clouds.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bk5yqefge5l0v
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
[gd_scene format=3 uid="uid://tlcdxoupi2lb"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b5ukhu38gqv6" path="res://sprites/cloud layers.png" id="1_b1x6b"]
|
||||
[ext_resource type="Script" uid="uid://bk5yqefge5l0v" path="res://scenes/parallax_clouds.gd" id="1_wed3d"]
|
||||
[ext_resource type="Texture2D" uid="uid://cu1hmiru4slak" path="res://sprites/coffee-buoy.png" id="2_pcgsf"]
|
||||
|
||||
[node name="Parallax Clouds" type="Node2D" unique_id=1859128454]
|
||||
[node name="ParallaxClouds" type="Node2D" unique_id=1859128454]
|
||||
z_index = -100
|
||||
script = ExtResource("1_wed3d")
|
||||
|
||||
[node name="Foreground" type="Parallax2D" parent="." unique_id=1810383542]
|
||||
[node name="Foreground" type="Parallax2D" parent="." unique_id=1810383542 groups=["parallax_clouds"]]
|
||||
self_modulate = Color(0.09185078, 0.09185078, 0.09185078, 1)
|
||||
z_index = 5
|
||||
scroll_scale = Vector2(1, 2.5)
|
||||
|
|
@ -14,6 +16,7 @@ scroll_offset = Vector2(-88, -1)
|
|||
repeat_size = Vector2(0, 64)
|
||||
autoscroll = Vector2(0, 12)
|
||||
repeat_times = 6
|
||||
follow_viewport = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Foreground" unique_id=1072362228]
|
||||
texture_repeat = 2
|
||||
|
|
@ -32,13 +35,14 @@ hframes = 4
|
|||
frame = 3
|
||||
region_rect = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="Midground A" type="Parallax2D" parent="." unique_id=808073040]
|
||||
[node name="Midground A" type="Parallax2D" parent="." unique_id=808073040 groups=["parallax_clouds"]]
|
||||
z_index = 4
|
||||
scroll_scale = Vector2(-1, 1.75)
|
||||
scroll_scale = Vector2(1, 2.5)
|
||||
scroll_offset = Vector2(-87, -1)
|
||||
repeat_size = Vector2(0, 64)
|
||||
autoscroll = Vector2(0, 6)
|
||||
repeat_times = 6
|
||||
follow_viewport = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Midground A" unique_id=1827015332]
|
||||
texture_repeat = 2
|
||||
|
|
@ -57,13 +61,14 @@ hframes = 4
|
|||
frame = 2
|
||||
region_rect = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="Midground B" type="Parallax2D" parent="." unique_id=2012107382]
|
||||
[node name="Midground B" type="Parallax2D" parent="." unique_id=2012107382 groups=["parallax_clouds"]]
|
||||
z_index = 3
|
||||
scroll_scale = Vector2(-1, 1)
|
||||
scroll_scale = Vector2(1, 2.5)
|
||||
scroll_offset = Vector2(-87, -1)
|
||||
repeat_size = Vector2(0, 64)
|
||||
autoscroll = Vector2(0, 4)
|
||||
repeat_times = 6
|
||||
follow_viewport = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Midground B" unique_id=319143427]
|
||||
texture_repeat = 2
|
||||
|
|
@ -82,12 +87,13 @@ hframes = 4
|
|||
frame = 1
|
||||
region_rect = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="Background Nothing" type="Parallax2D" parent="." unique_id=603653601]
|
||||
scroll_scale = Vector2(1.5, -2)
|
||||
[node name="Background Nothing" type="Parallax2D" parent="." unique_id=603653601 groups=["parallax_clouds"]]
|
||||
scroll_scale = Vector2(1, 2.5)
|
||||
scroll_offset = Vector2(-89, -27)
|
||||
repeat_size = Vector2(0, 32)
|
||||
autoscroll = Vector2(0, 1.5)
|
||||
repeat_times = 11
|
||||
follow_viewport = false
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Background Nothing" unique_id=2117909699]
|
||||
modulate = Color(0.6524728, 0.65247285, 0.6524728, 1)
|
||||
|
|
@ -108,18 +114,18 @@ flip_h = true
|
|||
region_enabled = true
|
||||
region_rect = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="Coffee Buoy" type="Parallax2D" parent="." unique_id=813362228]
|
||||
[node name="CoffeeBuoy" type="Parallax2D" parent="." unique_id=813362228 groups=["parallax_clouds"]]
|
||||
self_modulate = Color(0.5931336, 0.59313357, 0.59313357, 1)
|
||||
scroll_scale = Vector2(1, -2)
|
||||
repeat_size = Vector2(0, 375)
|
||||
autoscroll = Vector2(0, 1)
|
||||
repeat_times = 3
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Coffee Buoy" unique_id=997370246]
|
||||
[node name="Sprite2D" type="Sprite2D" parent="CoffeeBuoy" unique_id=997370246]
|
||||
position = Vector2(150, 205)
|
||||
texture = ExtResource("2_pcgsf")
|
||||
|
||||
[node name="Sprite2D2" type="Sprite2D" parent="Coffee Buoy" unique_id=603875955]
|
||||
[node name="Sprite2D2" type="Sprite2D" parent="CoffeeBuoy" unique_id=603875955]
|
||||
position = Vector2(85, 45)
|
||||
scale = Vector2(0.75, 0.75)
|
||||
texture = ExtResource("2_pcgsf")
|
||||
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
BIN
sprites/boss.png
Normal file
BIN
sprites/boss.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
40
sprites/boss.png.import
Normal file
40
sprites/boss.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c7gbcrellomr1"
|
||||
path="res://.godot/imported/boss.png-8e0f7b753b6876320f88ddc863616c73.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sprites/boss.png"
|
||||
dest_files=["res://.godot/imported/boss.png-8e0f7b753b6876320f88ddc863616c73.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Loading…
Add table
Add a link
Reference in a new issue