Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/SmokeEffect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/SmokeEffect.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://i6ry58a42opo"
path="res://.godot/imported/SmokeEffect.png-d472aa3473f864c8007b26aa70d5c23a.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/SmokeEffect.png"
dest_files=["res://.godot/imported/SmokeEffect.png-d472aa3473f864c8007b26aa70d5c23a.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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
1 change: 1 addition & 0 deletions scenes/enemies/lava_ant.gd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func _on_attack_area_2d_body_entered(body):
func explode():
animation_player.play("RESET")
animated_sprite_2d.play("explode")
$ExplosionAudio.play()
Globals.add_screenshake(0.3)
for body in $AttackArea2D.get_overlapping_bodies():
if body is Enemy:
Expand Down
7 changes: 6 additions & 1 deletion scenes/enemies/lava_ant.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=3 uid="uid://d1mr1jwoop6vc"]
[gd_scene load_steps=18 format=3 uid="uid://d1mr1jwoop6vc"]

[ext_resource type="Script" uid="uid://d13keqcgktvc4" path="res://scenes/enemies/lava_ant.gd" id="1_1ih35"]
[ext_resource type="Material" uid="uid://cgls8su2rfgsh" path="res://shaders/flash_shader_material.tres" id="2_ey3sv"]
Expand All @@ -9,6 +9,7 @@
[ext_resource type="Texture2D" uid="uid://d2qnxcrcwusfv" path="res://PlaceholderAssets/Explosion/explosion02.png" id="5_ba1pi"]
[ext_resource type="Texture2D" uid="uid://c7v66xxgb11qx" path="res://PlaceholderAssets/Explosion/explosion03.png" id="6_ckxfm"]
[ext_resource type="Texture2D" uid="uid://clmfdiep65s2d" path="res://assets/circle.png" id="9_ckxfm"]
[ext_resource type="AudioStream" uid="uid://p7cwke4uo0oc" path="res://assets/music/SoundFX/boom04.wav" id="10_bm7qs"]

[sub_resource type="CircleShape2D" id="CircleShape2D_ey3sv"]
radius = 50.0
Expand Down Expand Up @@ -184,6 +185,10 @@ texture = ExtResource("9_ckxfm")
[node name="RayCast2D" type="RayCast2D" parent="."]
rotation = 1.5708

[node name="ExplosionAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("10_bm7qs")
volume_db = -5.0

[connection signal="body_entered" from="AttackArea2D" to="." method="_on_attack_area_2d_body_entered"]
[connection signal="body_exited" from="AttackArea2D" to="." method="_on_attack_area_2d_body_exited"]
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
Expand Down
3 changes: 3 additions & 0 deletions scenes/globals.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ enum WeaponEnum {
SHOTGUN,
MACHINE_GUN
}

const PICKUP_AUDIO = preload("res://assets/music/SoundFX/pickup01.wav")

var inventory = [true,false,false]
var damage_upgrades: int = 0
var firerate_upgrades: int = 0
Expand Down
6 changes: 6 additions & 0 deletions scenes/hero.gd
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func _on_screenshake(amount: float) -> void:
$Camera2D.add_shake(amount)

func _on_collectable_collected(type: String):
$AudioStreamPlayer2D.play()
if type == "crystal":
#print("num collected: ", crystals_collected)
$Hud/HBoxContainer/CrystalLabel.text = str(Globals.crystals_collected)
Expand Down Expand Up @@ -158,6 +159,7 @@ func burn(input:call_state):
call_state.Start:
if not is_in_lava:
$Label.text = "Burning"
$CPUParticles2DSmoke.emitting = true
is_in_lava=true
burn(call_state.Hold)
call_state.Hold:
Expand All @@ -176,12 +178,14 @@ func burn(input:call_state):
is_burning_after = true
await damage_over_time(2, 5, 2.0, 'Burning')
$Label.text = "Player"
$CPUParticles2DSmoke.emitting = false

func acidify(input: call_state):
match input:
call_state.Start:
if not is_in_acid:
$Label.text = "Acidic"
$CPUParticles2DSmoke.emitting = false
is_in_acid=true
acidify(call_state.Hold)
call_state.Hold:
Expand All @@ -197,6 +201,7 @@ func acidify(input: call_state):
call_state.End:
is_in_acid = false
$Label.text = "Player"
$CPUParticles2DSmoke.emitting = false
#
func damage_over_time(damage: int, num_hits: int, wait_time: float, effect: String):
$Label.text = effect
Expand All @@ -213,3 +218,4 @@ func damage_over_time(damage: int, num_hits: int, wait_time: float, effect: Stri
if effect == "Burning":
is_burning_after = false
$Label.text = "Player"
$CPUParticles2DSmoke.emitting = false
24 changes: 23 additions & 1 deletion scenes/hero.tscn
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[gd_scene load_steps=20 format=3 uid="uid://qxbajo21gg4j"]
[gd_scene load_steps=23 format=3 uid="uid://qxbajo21gg4j"]

[ext_resource type="Script" uid="uid://bplv08s5b0u13" path="res://scenes/hero.gd" id="1_w7pyx"]
[ext_resource type="Texture2D" uid="uid://i6ry58a42opo" path="res://assets/SmokeEffect.png" id="2_6mqrs"]
[ext_resource type="Texture2D" uid="uid://hck1dqeicbyn" path="res://PlaceholderAssets/hero.png" id="2_mv13s"]
[ext_resource type="Shader" uid="uid://b5amdpamwydut" path="res://shaders/teleport.gdshader" id="2_n40cg"]
[ext_resource type="PackedScene" uid="uid://c4jn5ceehyndd" path="res://scenes/weapons/plasma_rifle.tscn" id="3_06baw"]
Expand All @@ -11,6 +12,11 @@
[ext_resource type="PackedScene" uid="uid://dpav2ennn0x4p" path="res://scenes/weapons/shotgun.tscn" id="9_n5qna"]
[ext_resource type="PackedScene" uid="uid://c3anhwxelnmxv" path="res://scenes/weapons/machine_gun.tscn" id="10_d6xj2"]
[ext_resource type="AudioStream" uid="uid://d0dcuwp2v33lv" path="res://assets/music/SoundFX/teleport02.wav" id="11_d6xj2"]
[ext_resource type="AudioStream" uid="uid://d4a7c1qsd5knu" path="res://assets/music/SoundFX/pickup01.wav" id="12_sryfu"]

[sub_resource type="Gradient" id="Gradient_k8rms"]
offsets = PackedFloat32Array(0, 0.627404, 0.995192, 1)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.113725, 1, 1, 1, 1)

[sub_resource type="ShaderMaterial" id="ShaderMaterial_mo806"]
shader = ExtResource("2_n40cg")
Expand Down Expand Up @@ -157,6 +163,19 @@ script = ExtResource("1_w7pyx")

[node name="MeleeAttackTimer" type="Timer" parent="."]

[node name="CPUParticles2DSmoke" type="CPUParticles2D" parent="."]
position = Vector2(-1, 37)
emitting = false
texture = ExtResource("2_6mqrs")
lifetime = 1.5
gravity = Vector2(0, -200)
initial_velocity_max = 100.0
scale_amount_max = 2.0
color = Color(1, 1, 1, 0.890196)
color_ramp = SubResource("Gradient_k8rms")
hue_variation_min = -0.22
hue_variation_max = 0.24

[node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_mo806")
texture = ExtResource("2_mv13s")
Expand Down Expand Up @@ -216,3 +235,6 @@ cooldown = 0.25
[node name="TeleportAudio" type="AudioStreamPlayer" parent="."]
stream = ExtResource("11_d6xj2")
volume_db = -5.0

[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("12_sryfu")
2 changes: 1 addition & 1 deletion shaders/flash_shader_material.tres
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
[resource]
resource_local_to_scene = true
shader = ExtResource("1_1quyw")
shader_parameter/active = true
shader_parameter/active = false
shader_parameter/color = Color(1, 1, 1, 1)