Final jam version submisson: added placeholder sounds, fixed character
flashing on game restart.
This commit is contained in:
parent
8679e817ee
commit
df13ee42d8
36 changed files with 400 additions and 58 deletions
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
name="Web"
|
||||
platform="Web"
|
||||
runnable=false
|
||||
runnable=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter="*"
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/2026-03-06 235841 The Third Place/index.html"
|
||||
export_path="../../Downloads/2026-03-08 121752 The Third Place/index.html"
|
||||
patches=PackedStringArray()
|
||||
patch_delta_encoding=false
|
||||
patch_delta_compression_level_zstd=19
|
||||
|
|
@ -52,7 +52,7 @@ threads/godot_pool_size=4
|
|||
|
||||
name="macOS"
|
||||
platform="macOS"
|
||||
runnable=true
|
||||
runnable=false
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
|
|
@ -312,7 +312,7 @@ rm -rf \"{temp_dir}\""
|
|||
|
||||
name="Windows Desktop"
|
||||
platform="Windows Desktop"
|
||||
runnable=true
|
||||
runnable=false
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
|
|
|
|||
|
|
@ -11,11 +11,12 @@ var pause: bool = false
|
|||
|
||||
var horse_counter: int = 0
|
||||
var horse_phase: bool = true
|
||||
var exploding:bool = false
|
||||
var exploding:bool = false
|
||||
var heart_taken: bool = false
|
||||
var heart_broken: bool = false
|
||||
|
||||
@onready var boss = $AnimationPlayer
|
||||
@onready var heart = $Boss/Heart/AnimationPlayer
|
||||
@onready var screensize = get_viewport_rect().size
|
||||
|
||||
func _ready():
|
||||
|
|
@ -63,8 +64,10 @@ func boss_horse():
|
|||
print("Boss horse!")
|
||||
await get_tree().create_timer(2).timeout
|
||||
EventBus.flash_screen.emit(.15)
|
||||
$Heart.hide()
|
||||
$Heart.monitoring = false
|
||||
#if heart_taken == true: return
|
||||
#$Heart.hide()
|
||||
#heart.stop()
|
||||
#$Heart.monitoring = false
|
||||
$Sprite2D.frame = 7
|
||||
$Horse.show()
|
||||
$Horse.start()
|
||||
|
|
@ -105,6 +108,7 @@ func offer_heart():
|
|||
print("Lady of Whispers offers you a heart!")
|
||||
boss.play("rise")
|
||||
await get_tree().create_timer(4).timeout
|
||||
$Heart/AnimationPlayer.play("beat")
|
||||
$Heart.show()
|
||||
$Heart.monitoring = true
|
||||
$Heart.monitorable = true
|
||||
|
|
@ -112,10 +116,15 @@ func offer_heart():
|
|||
|
||||
func heart_check():
|
||||
print("Heart check!")
|
||||
await get_tree().create_timer(5).timeout
|
||||
if heart_taken == false:
|
||||
await get_tree().create_timer(4).timeout
|
||||
await get_tree().create_timer(1).timeout
|
||||
horse_counter = 0
|
||||
print("Horse Counter:",horse_counter)
|
||||
$Heart/AnimationPlayer.stop()
|
||||
$Heart.hide()
|
||||
$Heart.monitoring = false
|
||||
$Heart.monitorable = false
|
||||
|
||||
if heart_taken == true or heart_broken == true:
|
||||
#$Heart.monitoring = false
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@
|
|||
[ext_resource type="Texture2D" uid="uid://dy743vehs0t1t" path="res://icon.svg" id="5_wqpjq"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4nhwvs13x5bc" path="res://sprites/heart.png" id="7_2cdgk"]
|
||||
[ext_resource type="Script" uid="uid://b01h56iyb6pp2" path="res://scenes/heart.gd" id="7_qsl3t"]
|
||||
[ext_resource type="AudioStream" uid="uid://c7q8cq4h58pfo" path="res://sounds/pew.wav" id="8_5f346"]
|
||||
[ext_resource type="AudioStream" uid="uid://p1cak78qhthj" path="res://sounds/horse.wav" id="9_0onds"]
|
||||
[ext_resource type="AudioStream" uid="uid://bwdkcyrjnxfhu" path="res://sounds/chicken_thunk.wav" id="9_2avx2"]
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_qsl3t"]
|
||||
particle_flag_disable_z = true
|
||||
|
|
@ -198,6 +201,21 @@ tracks/0/keys = {
|
|||
"update": 0,
|
||||
"values": [Vector2(1, 1), Vector2(1.15, 1.15), Vector2(0.75, 0.75)]
|
||||
}
|
||||
tracks/1/type = "audio"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Thumper")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"clips": [{
|
||||
"end_offset": 0.0,
|
||||
"start_offset": 0.0,
|
||||
"stream": ExtResource("9_2avx2")
|
||||
}],
|
||||
"times": PackedFloat32Array(0.23333333)
|
||||
}
|
||||
tracks/1/use_blend = true
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_0onds"]
|
||||
_data = {
|
||||
|
|
@ -271,6 +289,17 @@ texture = ExtResource("5_wqpjq")
|
|||
wait_time = 0.05
|
||||
one_shot = true
|
||||
|
||||
[node name="Pew" type="AudioStreamPlayer2D" parent="Horse" unique_id=199750061]
|
||||
stream = ExtResource("8_5f346")
|
||||
volume_db = -13.0
|
||||
pitch_scale = 0.95
|
||||
max_polyphony = 4
|
||||
|
||||
[node name="HorseWinnie" type="AudioStreamPlayer2D" parent="Horse" unique_id=1530275436]
|
||||
stream = ExtResource("9_0onds")
|
||||
volume_db = -6.0
|
||||
pitch_scale = 1.15
|
||||
|
||||
[node name="Heart" type="Area2D" parent="." unique_id=1098254590 groups=["heart"]]
|
||||
visible = false
|
||||
position = Vector2(0, -71)
|
||||
|
|
@ -287,6 +316,9 @@ shape = SubResource("RectangleShape2D_qsl3t")
|
|||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Heart" unique_id=47669741]
|
||||
libraries/ = SubResource("AnimationLibrary_0onds")
|
||||
autoplay = &"beat"
|
||||
|
||||
[node name="Thumper" type="AudioStreamPlayer2D" parent="Heart" unique_id=1251816952]
|
||||
volume_db = -10.651
|
||||
pitch_scale = 0.64
|
||||
|
||||
[connection signal="timeout" from="Horse/ShootTimer" to="Horse" method="_on_shoot_timer_timeout"]
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ var horse_phase: bool = false
|
|||
#rotater.rotation_degrees - fmod(new_rotation, 360)
|
||||
|
||||
func start():
|
||||
$HorseWinnie.play()
|
||||
shoot_timer.start()
|
||||
rotate_direction = randi_range(0,1)
|
||||
print("Shoot timer started!")
|
||||
|
|
@ -61,6 +62,7 @@ func _process(_delta):
|
|||
|
||||
func spawn_bullet():
|
||||
var bullet = bullet_scene.instantiate()
|
||||
$Pew.play()
|
||||
get_tree().root.add_child(bullet)
|
||||
bullet.position = rotater.global_position
|
||||
bullet.rotation = rotater.global_rotation
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ extends Area2D
|
|||
var shader_active = false
|
||||
var pause = false
|
||||
var target = null
|
||||
var stuck: bool = false
|
||||
|
||||
@onready var head_splat = preload("res://sprites/head_splat.png")
|
||||
|
||||
|
|
@ -49,11 +50,14 @@ func _on_area_entered(area: Area2D) -> void:
|
|||
queue_free()
|
||||
|
||||
"shards":
|
||||
if stuck == true: return
|
||||
if area.is_in_group("shards"):
|
||||
#print("Shards hit!")
|
||||
area.hit_detection()
|
||||
# stick_to_target(target)
|
||||
reparent(area)
|
||||
stuck = true
|
||||
$Splat.play()
|
||||
$Sprite2D.texture = head_splat
|
||||
$Sprite2D.hframes = 1
|
||||
position = Vector2.ZERO
|
||||
|
|
@ -63,6 +67,7 @@ func _on_area_entered(area: Area2D) -> void:
|
|||
|
||||
|
||||
"mirror":
|
||||
if stuck == true: return
|
||||
if area.is_in_group("enemies"):
|
||||
print("Mirror hit!")
|
||||
area.hit_detection()
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
[ext_resource type="Shader" uid="uid://dfywtah53il1m" path="res://shaders/player_hit.gdshader" id="2_eoqba"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnc77g20gb20h" path="res://sprites/david-head.png" id="2_y25gk"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwd6pycecukqb" path="res://sprites/david-headshot.png" id="3_l5glv"]
|
||||
[ext_resource type="AudioStream" uid="uid://cy01lrl2la6bn" path="res://sounds/splat_alt.wav" id="5_qncy5"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qncy5"]
|
||||
shader = ExtResource("2_eoqba")
|
||||
|
|
@ -42,5 +43,9 @@ shape = SubResource("RectangleShape2D_2b2rl")
|
|||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="." unique_id=210965331]
|
||||
|
||||
[node name="Splat" type="AudioStreamPlayer2D" parent="." unique_id=950499235]
|
||||
stream = ExtResource("5_qncy5")
|
||||
volume_db = -1.425
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ func _on_timer_timeout() -> void:
|
|||
|
||||
func _on_shoot_timer_timeout():
|
||||
var b = bullet_scene.instantiate()
|
||||
$Pew.play()
|
||||
get_tree().root.add_child(b)
|
||||
b.start(position)
|
||||
$ShootTimer.wait_time = randf_range(4, 20)
|
||||
|
|
@ -51,6 +52,7 @@ func hit_detection():
|
|||
EventBus.enemy_hit.emit(5)
|
||||
speed = 0
|
||||
$AnimationPlayer.play("explode")
|
||||
$ChickenHit.play()
|
||||
#set_deferred("monitoring", false)
|
||||
await $AnimationPlayer.animation_finished
|
||||
queue_free()
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
[ext_resource type="Script" uid="uid://i0r17jo6838m" path="res://scenes/enemy_chicken.gd" id="1_s7c3p"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy4jggxmnohbb" path="res://sprites/chicken.png" id="2_h1rgn"]
|
||||
[ext_resource type="Texture2D" uid="uid://bm7fgqwqfqmf4" path="res://sprites/explosion_pallete-swap.png" id="3_s7c3p"]
|
||||
[ext_resource type="AudioStream" uid="uid://bwdkcyrjnxfhu" path="res://sounds/chicken_thunk.wav" id="4_7ellt"]
|
||||
[ext_resource type="AudioStream" uid="uid://c7q8cq4h58pfo" path="res://sounds/pew.wav" id="5_od8vd"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4gyqm"]
|
||||
size = Vector2(28.57145, 28.571442)
|
||||
|
|
@ -219,5 +221,14 @@ one_shot = true
|
|||
libraries/ = SubResource("AnimationLibrary_7ellt")
|
||||
autoplay = &"flap"
|
||||
|
||||
[node name="ChickenHit" type="AudioStreamPlayer2D" parent="." unique_id=484642092]
|
||||
stream = ExtResource("4_7ellt")
|
||||
volume_db = -9.26
|
||||
|
||||
[node name="Pew" type="AudioStreamPlayer2D" parent="." unique_id=2040231846]
|
||||
stream = ExtResource("5_od8vd")
|
||||
volume_db = -16.0
|
||||
max_polyphony = 4
|
||||
|
||||
[connection signal="timeout" from="MoveTimer" to="." method="_on_timer_timeout"]
|
||||
[connection signal="timeout" from="ShootTimer" to="." method="_on_shoot_timer_timeout"]
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ func _on_direction_timer_timeout():
|
|||
func _on_shoot_timer_timeout():
|
||||
if can_shoot == true:
|
||||
var b = bullet_scene.instantiate()
|
||||
$Pew.play()
|
||||
get_tree().root.add_child(b)
|
||||
b.start(position)
|
||||
#$ShootTimer.wait_time = randf_range(4, 20)
|
||||
|
|
@ -120,6 +121,7 @@ func block():
|
|||
#if blocking: return
|
||||
#blocking = true
|
||||
stunned = true
|
||||
$BlockCRT.play()
|
||||
print("CRT Stunned!")
|
||||
$DirectionTimer.stop()
|
||||
shader_active = true
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
[ext_resource type="Texture2D" uid="uid://cy4jggxmnohbb" path="res://sprites/chicken.png" id="2_ugdur"]
|
||||
[ext_resource type="Texture2D" uid="uid://bm7fgqwqfqmf4" path="res://sprites/explosion_pallete-swap.png" id="3_emiuq"]
|
||||
[ext_resource type="AudioStream" uid="uid://cbi5q575w1g1n" path="res://sounds/CRT_IMPACT.wav" id="6_gas3w"]
|
||||
[ext_resource type="AudioStream" uid="uid://drnkea24pvbar" path="res://sounds/crt_block.wav" id="6_r7ajx"]
|
||||
[ext_resource type="AudioStream" uid="uid://c7q8cq4h58pfo" path="res://sounds/pew.wav" id="7_r7ajx"]
|
||||
|
||||
[sub_resource type="Shader" id="Shader_emiuq"]
|
||||
code = "shader_type canvas_item;
|
||||
|
|
@ -256,6 +258,16 @@ libraries/ = SubResource("AnimationLibrary_7ellt")
|
|||
stream = ExtResource("6_gas3w")
|
||||
volume_db = -16.028
|
||||
|
||||
[node name="BlockCRT" type="AudioStreamPlayer2D" parent="." unique_id=2105873606]
|
||||
stream = ExtResource("6_r7ajx")
|
||||
volume_db = -1.424
|
||||
|
||||
[node name="Pew" type="AudioStreamPlayer2D" parent="." unique_id=1064680598]
|
||||
stream = ExtResource("7_r7ajx")
|
||||
volume_db = -20.82
|
||||
pitch_scale = 0.95
|
||||
max_polyphony = 2
|
||||
|
||||
[connection signal="timeout" from="MoveTimer" to="." method="_on_timer_timeout"]
|
||||
[connection signal="timeout" from="ShootTimer" to="." method="_on_shoot_timer_timeout"]
|
||||
[connection signal="timeout" from="DirectionTimer" to="." method="_on_direction_timer_timeout"]
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ extends Area2D
|
|||
|
||||
func _ready() -> void:
|
||||
EventBus.heart_beat.connect(_on_heart_beat)
|
||||
|
||||
|
||||
func _on_heart_beat(tempo: float):
|
||||
if tempo == 0:
|
||||
|
|
@ -10,3 +11,4 @@ func _on_heart_beat(tempo: float):
|
|||
tween.tween_property(self, "modulate",Color(0,0,0), 2.5)
|
||||
elif tempo > 0:
|
||||
$AnimationPlayer.set_speed_scale(tempo)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ var player = preload("res://scenes/player.tscn")
|
|||
var instance = null
|
||||
var playing: bool = false
|
||||
|
||||
|
||||
var enemy_wave: int
|
||||
var enemy_count: int = 0:
|
||||
set(value):
|
||||
|
|
@ -30,7 +31,7 @@ func _ready():
|
|||
EventBus.secret_win_game.connect(_on_secret_win_game)
|
||||
|
||||
|
||||
#func spawn_enemies():
|
||||
#func spawn_enemies():
|
||||
## print("Remaining enemies: ", enemy_count)
|
||||
## await get_tree().process_frame
|
||||
#enemy_wave += 1
|
||||
|
|
@ -80,6 +81,7 @@ func _on_player_died():
|
|||
# get_tree().call_group("enemies", "queue_free")
|
||||
# $Player.set_process(false)
|
||||
# get_tree().call_group("enemies", "set_process", false)
|
||||
$SFX/AmbientHiss.stop()
|
||||
EventBus.goose_talk.emit(7)
|
||||
instance.queue_free()
|
||||
game_over.show()
|
||||
|
|
@ -106,15 +108,14 @@ func new_game():
|
|||
Global.score = 0
|
||||
$CanvasLayer/UI.update_score(Global.score)
|
||||
|
||||
# Tell the shield to recharge.
|
||||
# EventBus.initialize_shieldbar.emit()
|
||||
# await EventBus.initialize_shieldbar
|
||||
# Tell the shield to recharge without flashing the player.
|
||||
|
||||
# instantiate the Player
|
||||
# await get_tree().create_timer(1).timeout
|
||||
instance = player.instantiate()
|
||||
add_child(instance)
|
||||
$Player.start()
|
||||
$SFX/AmbientHiss.play()
|
||||
|
||||
# Reset Clouds
|
||||
EventBus.cloud_speed.emit(false)
|
||||
|
|
@ -177,7 +178,7 @@ func _on_win_game(value: int):
|
|||
playing = false
|
||||
$Player._on_player_victory(2)
|
||||
await $Player._on_player_victory(2)
|
||||
game_over.show()
|
||||
game_over.show()
|
||||
await get_tree().create_timer(5).timeout
|
||||
game_over.hide()
|
||||
$CanvasLayer/Title.show()
|
||||
|
|
@ -186,6 +187,7 @@ func _on_win_game(value: int):
|
|||
|
||||
func _on_flash_screen(duration: float = .25):
|
||||
print("flash!")
|
||||
$SFX/Tuner.play()
|
||||
$CanvasLayer/ColorRect.visible = true
|
||||
await get_tree().create_timer(duration).timeout
|
||||
#var tween = create_tween().set_parallel(false)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
[ext_resource type="PackedScene" uid="uid://cd1kwb8klcsb5" path="res://scenes/goose.tscn" id="9_85g3d"]
|
||||
[ext_resource type="AudioStream" uid="uid://c3e8sdfqcikp6" path="res://sounds/welcome.wav" id="10_choun"]
|
||||
[ext_resource type="PackedScene" uid="uid://drf1k1iulvy6f" path="res://scenes/wave.tscn" id="11_ya4ey"]
|
||||
[ext_resource type="AudioStream" uid="uid://c4rr5yd22wmof" path="res://sounds/Ambient 1.0.wav" id="12_trceg"]
|
||||
[ext_resource type="AudioStream" uid="uid://i61hg7wispq6" path="res://sounds/Ambient 2.0.wav" id="12_trceg"]
|
||||
[ext_resource type="AudioStream" uid="uid://mjhprrmwn7qk" path="res://sounds/radio_tune.wav" id="14_a8y0u"]
|
||||
[ext_resource type="AudioStream" uid="uid://btna02f5ajd7y" path="res://sounds/ambient_hiss.wav" id="15_jkv2x"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1bvp3"]
|
||||
length = 0.001
|
||||
|
|
@ -135,13 +137,24 @@ position = Vector2(301, 272)
|
|||
[node name="Welcome" type="AudioStreamPlayer2D" parent="." unique_id=1716491479]
|
||||
position = Vector2(118, 162)
|
||||
stream = ExtResource("10_choun")
|
||||
volume_db = -0.5
|
||||
volume_db = 0.5
|
||||
|
||||
[node name="LevelAudio" type="AudioStreamPlayer2D" parent="." unique_id=2125260365]
|
||||
stream = ExtResource("12_trceg")
|
||||
volume_db = -20.0
|
||||
pitch_scale = 0.8
|
||||
|
||||
[node name="Wave" parent="." unique_id=2117861058 instance=ExtResource("11_ya4ey")]
|
||||
|
||||
[node name="SFX" type="Node2D" parent="." unique_id=2059049976]
|
||||
|
||||
[node name="Tuner" type="AudioStreamPlayer2D" parent="SFX" unique_id=751830572]
|
||||
stream = ExtResource("14_a8y0u")
|
||||
volume_db = -27.781
|
||||
pitch_scale = 0.8
|
||||
max_polyphony = 2
|
||||
|
||||
[node name="AmbientHiss" type="AudioStreamPlayer2D" parent="SFX" unique_id=2084228487]
|
||||
stream = ExtResource("15_jkv2x")
|
||||
volume_db = -17.0
|
||||
pitch_scale = 0.71
|
||||
|
||||
[connection signal="pressed" from="CanvasLayer/CenterContainer/Start" to="." method="_on_start_pressed"]
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ var clamp_shield = clamp(shield, 0, max_shield)
|
|||
@onready var explosion = $Explosion
|
||||
@onready var wait_time = $GunCooldown
|
||||
@onready var ship = $Ship
|
||||
@onready var game_status = get_node("/root/Main")
|
||||
|
||||
func _ready():
|
||||
set_process(false)
|
||||
|
|
@ -38,23 +39,25 @@ func _ready():
|
|||
|
||||
func start():
|
||||
print(shield)
|
||||
shader_active = false
|
||||
$Ship.frame = 0
|
||||
# $Ship/Boosters/BoosterBurst.hide()
|
||||
# $Ship/Boosters.hide()
|
||||
$Ship.show()
|
||||
position = Vector2(screensize.x / 2, screensize.y)
|
||||
var tween = create_tween()
|
||||
tween.tween_property(self, "position:y", 120 * -1, 1).as_relative()
|
||||
await tween.finished
|
||||
$GunCooldown.wait_time = cooldown
|
||||
_on_set_shield(max_shield)
|
||||
print(shield)
|
||||
await get_tree().create_timer(1).timeout
|
||||
set_process(true)
|
||||
# $Ship/Boosters.show()
|
||||
can_shoot = true
|
||||
# EventBus.shield_changed.emit(max_shield, old_value, shield)
|
||||
|
||||
if game_status.playing == false:
|
||||
shader_active = false
|
||||
$Ship.frame = 0
|
||||
# $Ship/Boosters/BoosterBurst.hide()
|
||||
# $Ship/Boosters.hide()
|
||||
$Ship.show()
|
||||
position = Vector2(screensize.x / 2, screensize.y)
|
||||
var tween = create_tween()
|
||||
tween.tween_property(self, "position:y", 120 * -1, 1).as_relative()
|
||||
await tween.finished
|
||||
$GunCooldown.wait_time = cooldown
|
||||
_on_set_shield(max_shield)
|
||||
print(shield)
|
||||
await get_tree().create_timer(1).timeout
|
||||
set_process(true)
|
||||
# $Ship/Boosters.show()
|
||||
can_shoot = true
|
||||
# EventBus.shield_changed.emit(max_shield, old_value, shield)
|
||||
|
||||
func _process(delta):
|
||||
if pause == true: return
|
||||
|
|
@ -91,20 +94,21 @@ func shoot():
|
|||
tween.tween_property(ship, "position:y", 0, 0.05)
|
||||
|
||||
func _on_set_shield(value: int):
|
||||
var old_value = shield
|
||||
# shield = clamp(value, 0, max_shield)
|
||||
shield = min(max_shield, value)
|
||||
EventBus.shield_changed.emit(max_shield, old_value, shield)
|
||||
print("Shield set to:", shield)
|
||||
if shield <= 0:
|
||||
set_process(false)
|
||||
$Ship.hide()
|
||||
shader_active = false
|
||||
$Explosion.show()
|
||||
$Explosion/AnimationPlayer.play("explosion-one-shot")
|
||||
await $Explosion/AnimationPlayer.animation_finished
|
||||
EventBus.player_died.emit()
|
||||
|
||||
|
||||
var old_value = shield
|
||||
# shield = clamp(value, 0, max_shield)
|
||||
shield = min(max_shield, value)
|
||||
EventBus.shield_changed.emit(max_shield, old_value, shield)
|
||||
print("Shield set to:", shield)
|
||||
if shield <= 0:
|
||||
set_process(false)
|
||||
$Ship.hide()
|
||||
shader_active = false
|
||||
$Explosion.show()
|
||||
$Explosion/AnimationPlayer.play("explosion-one-shot")
|
||||
await $Explosion/AnimationPlayer.animation_finished
|
||||
EventBus.player_died.emit()
|
||||
|
||||
|
||||
func _on_gun_cooldown_timeout() -> void:
|
||||
$HeadInflate.play()
|
||||
|
|
@ -161,8 +165,8 @@ func _on_area_entered(area):
|
|||
|
||||
func _on_damage_taken():
|
||||
|
||||
if shield == 0:
|
||||
shader_active = false
|
||||
if shield == 0 and game_status.playing == false:
|
||||
#shader_active = false
|
||||
return
|
||||
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@
|
|||
[ext_resource type="PackedScene" uid="uid://4jvu41vu2557" path="res://scenes/explosion.tscn" id="8_dw050"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnc77g20gb20h" path="res://sprites/david-head.png" id="8_ur7pv"]
|
||||
[ext_resource type="Texture2D" uid="uid://bm7fgqwqfqmf4" path="res://sprites/explosion_pallete-swap.png" id="10_d2wvv"]
|
||||
[ext_resource type="AudioStream" uid="uid://d3ejo2dfxblsx" path="res://sounds/HeadInflatePOP.wav" id="10_y4r1p"]
|
||||
[ext_resource type="AudioStream" uid="uid://co6fdp24nloo1" path="res://sounds/HeadInflatePOP 2.0.wav" id="11_d2wvv"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_b26j0"]
|
||||
resource_local_to_scene = true
|
||||
shader = ExtResource("3_dw050")
|
||||
shader_parameter/toggle = 0.0
|
||||
|
||||
|
|
@ -141,8 +142,8 @@ region_enabled = true
|
|||
region_rect = Rect2(0, 0, 96, 16)
|
||||
|
||||
[node name="HeadInflate" type="AudioStreamPlayer2D" parent="." unique_id=374500278]
|
||||
stream = ExtResource("10_y4r1p")
|
||||
volume_db = -9.973
|
||||
stream = ExtResource("11_d2wvv")
|
||||
volume_db = 2.1
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="damage_taken" from="." to="." method="_on_damage_taken"]
|
||||
|
|
|
|||
|
|
@ -56,18 +56,18 @@ func spawn_enemies():
|
|||
if wave_count == 2: #This if for Mirror
|
||||
print("Enemy Wave: ", wave_count)
|
||||
|
||||
# Spawn Table
|
||||
# Spawn Tablea
|
||||
EventBus.flash_screen.emit(.15)
|
||||
var t = TABLE.instantiate()
|
||||
add_child(t)
|
||||
t.position = Vector2(screensize.x / 2, position.y + 125)
|
||||
await get_tree().create_timer(1.5).timeout
|
||||
#await get_tree().create_timer(1.5).timeout
|
||||
var ts = t.get_child(2)
|
||||
await get_tree().create_timer(.9).timeout
|
||||
ts.play()
|
||||
ts = t.get_child(0)
|
||||
ts.frame = 1
|
||||
EventBus.flash_screen.emit(.15)
|
||||
EventBus.flash_screen.emit(.25)
|
||||
await get_tree().create_timer(1.5).timeout
|
||||
|
||||
# Spawn Mirror
|
||||
|
|
@ -89,7 +89,7 @@ func spawn_enemies():
|
|||
s.start_all_animations()
|
||||
|
||||
|
||||
if wave_count == 3: #This is for Boss
|
||||
if wave_count == 3 : #This is for Boss
|
||||
|
||||
# Hide the player
|
||||
|
||||
|
|
|
|||
BIN
sounds/Ambient 2.0.wav
Normal file
BIN
sounds/Ambient 2.0.wav
Normal file
Binary file not shown.
24
sounds/Ambient 2.0.wav.import
Normal file
24
sounds/Ambient 2.0.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://i61hg7wispq6"
|
||||
path="res://.godot/imported/Ambient 2.0.wav-495d1f100c20e3c6078fdeca860f7a0c.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/Ambient 2.0.wav"
|
||||
dest_files=["res://.godot/imported/Ambient 2.0.wav-495d1f100c20e3c6078fdeca860f7a0c.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/HeadInflatePOP 2.0.wav
Normal file
BIN
sounds/HeadInflatePOP 2.0.wav
Normal file
Binary file not shown.
24
sounds/HeadInflatePOP 2.0.wav.import
Normal file
24
sounds/HeadInflatePOP 2.0.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://co6fdp24nloo1"
|
||||
path="res://.godot/imported/HeadInflatePOP 2.0.wav-7e2fb9bcfc3292732e1f4a650231ade6.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/HeadInflatePOP 2.0.wav"
|
||||
dest_files=["res://.godot/imported/HeadInflatePOP 2.0.wav-7e2fb9bcfc3292732e1f4a650231ade6.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/ambient_hiss.wav
Normal file
BIN
sounds/ambient_hiss.wav
Normal file
Binary file not shown.
24
sounds/ambient_hiss.wav.import
Normal file
24
sounds/ambient_hiss.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://btna02f5ajd7y"
|
||||
path="res://.godot/imported/ambient_hiss.wav-d43fccbe8e358c369fd894bcf1d0dca4.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/ambient_hiss.wav"
|
||||
dest_files=["res://.godot/imported/ambient_hiss.wav-d43fccbe8e358c369fd894bcf1d0dca4.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=2
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/chicken_thunk.wav
Normal file
BIN
sounds/chicken_thunk.wav
Normal file
Binary file not shown.
24
sounds/chicken_thunk.wav.import
Normal file
24
sounds/chicken_thunk.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bwdkcyrjnxfhu"
|
||||
path="res://.godot/imported/chicken_thunk.wav-37fcab027e24207359c532b2296bb292.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/chicken_thunk.wav"
|
||||
dest_files=["res://.godot/imported/chicken_thunk.wav-37fcab027e24207359c532b2296bb292.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/crt_block.wav
Normal file
BIN
sounds/crt_block.wav
Normal file
Binary file not shown.
24
sounds/crt_block.wav.import
Normal file
24
sounds/crt_block.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://drnkea24pvbar"
|
||||
path="res://.godot/imported/crt_block.wav-ca0202ea166f322b5dfbe57101872995.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/crt_block.wav"
|
||||
dest_files=["res://.godot/imported/crt_block.wav-ca0202ea166f322b5dfbe57101872995.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/horse.wav
Normal file
BIN
sounds/horse.wav
Normal file
Binary file not shown.
24
sounds/horse.wav.import
Normal file
24
sounds/horse.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://p1cak78qhthj"
|
||||
path="res://.godot/imported/horse.wav-4566b679695baf484bed0c5a502345b9.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/horse.wav"
|
||||
dest_files=["res://.godot/imported/horse.wav-4566b679695baf484bed0c5a502345b9.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/pew.wav
Normal file
BIN
sounds/pew.wav
Normal file
Binary file not shown.
24
sounds/pew.wav.import
Normal file
24
sounds/pew.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c7q8cq4h58pfo"
|
||||
path="res://.godot/imported/pew.wav-8d820ccd907cd89972c6df0f1667baa2.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/pew.wav"
|
||||
dest_files=["res://.godot/imported/pew.wav-8d820ccd907cd89972c6df0f1667baa2.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/radio_tune.wav
Normal file
BIN
sounds/radio_tune.wav
Normal file
Binary file not shown.
24
sounds/radio_tune.wav.import
Normal file
24
sounds/radio_tune.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://mjhprrmwn7qk"
|
||||
path="res://.godot/imported/radio_tune.wav-9da5a2441d2e60305a94dbcc41b38d10.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/radio_tune.wav"
|
||||
dest_files=["res://.godot/imported/radio_tune.wav-9da5a2441d2e60305a94dbcc41b38d10.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/splat.wav
Normal file
BIN
sounds/splat.wav
Normal file
Binary file not shown.
24
sounds/splat.wav.import
Normal file
24
sounds/splat.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cuxj6otfeqcaf"
|
||||
path="res://.godot/imported/splat.wav-5a11ba69bf283a196760a37105b04429.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/splat.wav"
|
||||
dest_files=["res://.godot/imported/splat.wav-5a11ba69bf283a196760a37105b04429.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
BIN
sounds/splat_alt.wav
Normal file
BIN
sounds/splat_alt.wav
Normal file
Binary file not shown.
24
sounds/splat_alt.wav.import
Normal file
24
sounds/splat_alt.wav.import
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cy01lrl2la6bn"
|
||||
path="res://.godot/imported/splat_alt.wav-6422067d1ffe45bf14072bdd15a6ffba.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/splat_alt.wav"
|
||||
dest_files=["res://.godot/imported/splat_alt.wav-6422067d1ffe45bf14072bdd15a6ffba.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
Loading…
Add table
Add a link
Reference in a new issue