wonderful sounds and visuals

This commit is contained in:
pennyrigate 2024-06-14 23:20:34 -04:00
parent 828a4ccecc
commit 02793ddc38
21 changed files with 177 additions and 24 deletions

View file

@ -4,6 +4,7 @@ extends "res://maps/map.gd"
onready var sg_health: TextureProgress = $"%SGHealthBar"
onready var sg_energy: TextureProgress = $"%SGEnergyBar"
onready var fami_health: TextureProgress = $"%FamiHealthBar"
onready var laser_ok: TextureRect = $"%LaserOk"
onready var sg2083: KinematicBody2D = $"2083"
onready var famira: Node2D = $Famira
@ -13,15 +14,13 @@ func _ready() -> void:
sg2083.state = sg2083.State.INACTIVE
famira.animation_player.play("grow", -1.0, 0.0)
func _process(delta):
sg_energy.value -= 1
func _on_2083_health_changed(amount) -> void:
sg_health.value = amount
sg_health.value = amount - 4
func _on_Famira_health_changed(amount) -> void:
fami_health.value = amount
fami_health.value = ceil(amount) - 3
func _on_cutscene_finished() -> void:
@ -49,8 +48,14 @@ func start_fight() -> void:
famira.animation_player.state_chart.send_event("transformed")
func _on_2083_energy_changed(amount) -> void:
sg_energy.value = amount
func _on_2083_energy_changed(amount,laser_energy) -> void:
sg_energy.value = amount - 3
#Display heads up of laser status
if amount >= laser_energy:
if !Audio.ac_collectible.is_playing() && $"%LaserOk".visible == false: Audio.play_sound(Audio.a_laser_ready,Audio.ac_collectible)
$"%LaserOk".visible = true
else:
$"%LaserOk".visible = false
func _on_Famira_died() -> void:

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=28 format=2]
[ext_resource path="res://objects/enemy/boss/sg2083.tscn" type="PackedScene" id=1]
[ext_resource path="res://tilesets/t_laboratory.tres" type="TileSet" id=2]
@ -17,6 +17,31 @@
[ext_resource path="res://graphics/hud/2083_energy_filled.png" type="Texture" id=15]
[ext_resource path="res://graphics/hud/2083_health_filled.png" type="Texture" id=16]
[ext_resource path="res://graphics/hud/2083_health_back.png" type="Texture" id=17]
[ext_resource path="res://shaders/color_noise.gdshader" type="Shader" id=18]
[ext_resource path="res://shaders/ska_plane.gdshader" type="Shader" id=19]
[ext_resource path="res://shaders/beam_cycle.gdshader" type="Shader" id=20]
[ext_resource path="res://graphics/enemy/boss/stg_2600/beam_gradient.png" type="Texture" id=21]
[ext_resource path="res://graphics/hud/laser_ok_text.png" type="Texture" id=22]
[sub_resource type="ShaderMaterial" id=4]
shader = ExtResource( 19 )
shader_param/color_1 = Color( 1, 0.282353, 0, 0 )
shader_param/color_2 = Color( 0.478431, 0.113725, 0, 0.619608 )
shader_param/checker_size = Vector2( 4, 6 )
shader_param/pan_speed = Vector2( 4, 6 )
shader_param/cycle_speed = Vector2( 8, 0 )
shader_param/cycle_alternation = Vector2( 1, 8 )
shader_param/uv_transform = Transform2D( 1, 2, 1, 3, 0, 0 )
[sub_resource type="ShaderMaterial" id=3]
shader = ExtResource( 18 )
shader_param/animate_noise = true
shader_param/noise_intensity = 1.0
[sub_resource type="ShaderMaterial" id=5]
shader = ExtResource( 20 )
shader_param/cycle_speed = 3.0
shader_param/gradient = ExtResource( 21 )
[sub_resource type="Animation" id=1]
length = 0.001
@ -65,7 +90,7 @@ tracks/3/keys = {
"values": [ false ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("ParallaxBackground/ParallaxLayer/Sprite:visible")
tracks/4/path = NodePath("CanvasLayer/Sprite:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/imported = false
@ -174,16 +199,26 @@ pause_mode = 1
script = ExtResource( 3 )
lore_entries = [ ExtResource( 8 ) ]
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
layer = -11
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2( 0.5, 1 )
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
[node name="Sprite" type="Sprite" parent="CanvasLayer"]
position = Vector2( 128, 0 )
texture = ExtResource( 9 )
centered = false
offset = Vector2( -128, 0 )
[node name="ColorRect2" type="ColorRect" parent="CanvasLayer"]
material = SubResource( 4 )
margin_right = 256.0
margin_bottom = 192.0
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
material = SubResource( 3 )
margin_right = 256.0
margin_bottom = 192.0
color = Color( 1, 0, 0, 0.333333 )
[node name="GUI" type="CanvasLayer" parent="."]
[node name="Control" type="Control" parent="GUI"]
@ -221,6 +256,16 @@ margin_right = 100.0
margin_bottom = 22.0
texture = ExtResource( 10 )
[node name="LaserOk" type="TextureRect" parent="GUI/Control/Energy"]
unique_name_in_owner = true
visible = false
material = SubResource( 5 )
margin_left = 60.0
margin_top = 11.0
margin_right = 100.0
margin_bottom = 22.0
texture = ExtResource( 22 )
[node name="FamiHealth" type="Control" parent="GUI/Control/Energy"]
margin_left = 140.0
margin_top = -163.0