diff --git a/Audio/SFX/particle_projectile.wav b/Audio/SFX/particle_projectile.wav new file mode 100644 index 0000000..58f5eed --- /dev/null +++ b/Audio/SFX/particle_projectile.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:572352ee77874dcb009907db16c8ff7f14f09fcd0fffecc90b478a622cbdd78e +size 28296 diff --git a/Audio/SFX/particle_projectile.wav.import b/Audio/SFX/particle_projectile.wav.import new file mode 100644 index 0000000..290af72 --- /dev/null +++ b/Audio/SFX/particle_projectile.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://sgk7qu1ue4by" +path="res://.godot/imported/particle_projectile.wav-7a415af33fae2a0d6c0a326ab78f8ff1.sample" + +[deps] + +source_file="res://Audio/SFX/particle_projectile.wav" +dest_files=["res://.godot/imported/particle_projectile.wav-7a415af33fae2a0d6c0a326ab78f8ff1.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=0 diff --git a/Effects/energy_blast.tscn b/Effects/energy_blast.tscn new file mode 100644 index 0000000..97eaeb0 --- /dev/null +++ b/Effects/energy_blast.tscn @@ -0,0 +1,152 @@ +[gd_scene load_steps=20 format=3 uid="uid://dexgmkojd8tpt"] + +[ext_resource type="Texture2D" uid="uid://dewjqad2imuiv" path="res://Effects/energy_shot.png" id="1_j2aai"] +[ext_resource type="Script" path="res://Scripts/linear_projectile.gd" id="2_0d2ts"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_v8ncq"] +atlas = ExtResource("1_j2aai") +region = Rect2(147, 0, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_i2n43"] +atlas = ExtResource("1_j2aai") +region = Rect2(0, 20, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_t8ay6"] +atlas = ExtResource("1_j2aai") +region = Rect2(21, 20, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_bkv35"] +atlas = ExtResource("1_j2aai") +region = Rect2(42, 20, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lhvqi"] +atlas = ExtResource("1_j2aai") +region = Rect2(63, 20, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lp636"] +atlas = ExtResource("1_j2aai") +region = Rect2(84, 20, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ecj5n"] +atlas = ExtResource("1_j2aai") +region = Rect2(105, 20, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ymq7v"] +atlas = ExtResource("1_j2aai") +region = Rect2(126, 20, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8lpkm"] +atlas = ExtResource("1_j2aai") +region = Rect2(0, 0, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tme2m"] +atlas = ExtResource("1_j2aai") +region = Rect2(21, 0, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rakex"] +atlas = ExtResource("1_j2aai") +region = Rect2(42, 0, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4eg3n"] +atlas = ExtResource("1_j2aai") +region = Rect2(63, 0, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_re3wt"] +atlas = ExtResource("1_j2aai") +region = Rect2(84, 0, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_buoc1"] +atlas = ExtResource("1_j2aai") +region = Rect2(105, 0, 21, 20) + +[sub_resource type="AtlasTexture" id="AtlasTexture_v78jm"] +atlas = ExtResource("1_j2aai") +region = Rect2(126, 0, 21, 20) + +[sub_resource type="SpriteFrames" id="SpriteFrames_xmbcy"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_v8ncq") +}], +"loop": true, +"name": &"hit", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_i2n43") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_t8ay6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_bkv35") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lhvqi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lp636") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ecj5n") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ymq7v") +}], +"loop": true, +"name": &"horizontal", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_8lpkm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tme2m") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rakex") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4eg3n") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_re3wt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_buoc1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_v78jm") +}], +"loop": true, +"name": &"vertical", +"speed": 10.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_oiegt"] + +[node name="EnergyBlast" type="AnimatedSprite2D"] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_xmbcy") +animation = &"vertical" +script = ExtResource("2_0d2ts") + +[node name="Collision" type="Area2D" parent="."] +collision_layer = 8 +collision_mask = 34 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Collision"] +shape = SubResource("CircleShape2D_oiegt") +debug_color = Color(0.952941, 0.729412, 0, 0.419608) + +[node name="Timer" type="Timer" parent="."] +wait_time = 3.0 +one_shot = true +autostart = true + +[connection signal="area_entered" from="Collision" to="." method="_on_collision_area_entered"] +[connection signal="body_entered" from="Collision" to="." method="_on_collision_body_entered"] +[connection signal="timeout" from="Timer" to="." method="_on_timeout"] diff --git a/Effects/energy_shot.png b/Effects/energy_shot.png new file mode 100644 index 0000000..2e9553b --- /dev/null +++ b/Effects/energy_shot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f753a7fb7d801b520f673acf8ca8eba75cf537db4a9d9b5232e5287d7a16985 +size 1857 diff --git a/Effects/energy_shot.png.import b/Effects/energy_shot.png.import new file mode 100644 index 0000000..7ca0e1a --- /dev/null +++ b/Effects/energy_shot.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dewjqad2imuiv" +path="res://.godot/imported/energy_shot.png-d2e28fe1a4e7f6a74d2dd99c8d7635d1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Effects/energy_shot.png" +dest_files=["res://.godot/imported/energy_shot.png-d2e28fe1a4e7f6a74d2dd99c8d7635d1.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 diff --git a/Reed/reed_ai.tscn b/Reed/reed_ai.tscn index 60bbaf8..1bc717e 100644 --- a/Reed/reed_ai.tscn +++ b/Reed/reed_ai.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=70 format=3 uid="uid://bwrwh5of0jw4a"] +[gd_scene load_steps=71 format=3 uid="uid://bwrwh5of0jw4a"] [ext_resource type="Script" path="res://Scripts/hiro_ai.gd" id="1_yavbv"] +[ext_resource type="PackedScene" uid="uid://dexgmkojd8tpt" path="res://Effects/energy_blast.tscn" id="2_xodg4"] [ext_resource type="Shader" uid="uid://bcnip762rd6yj" path="res://Shaders/character.tres" id="2_y6nd7"] [ext_resource type="Texture2D" uid="uid://pittqsk5eskq" path="res://Reed/Reed Walk Sprite Cycle Line Up.png" id="3_2rpco"] [ext_resource type="AnimationLibrary" uid="uid://bhg3cnhjeq85r" path="res://Reed/reed_animation.tres" id="4_nk4o6"] @@ -269,7 +270,7 @@ states/range_attack/position = Vector2(424, 226) states/walk/node = SubResource("AnimationNodeBlendSpace2D_vunsg") states/walk/position = Vector2(519, 108) transitions = ["Start", "idle", SubResource("AnimationNodeStateMachineTransition_akmuq"), "idle", "walk", SubResource("AnimationNodeStateMachineTransition_sn1tm"), "walk", "idle", SubResource("AnimationNodeStateMachineTransition_5i3fu"), "idle", "melee", SubResource("AnimationNodeStateMachineTransition_y8p74"), "melee", "idle", SubResource("AnimationNodeStateMachineTransition_l17k0"), "hurt", "idle", SubResource("AnimationNodeStateMachineTransition_ln3pc"), "defeated", "defeated_loop", SubResource("AnimationNodeStateMachineTransition_l5ng5"), "range_attack", "idle", SubResource("AnimationNodeStateMachineTransition_ufuqv"), "idle", "range_attack", SubResource("AnimationNodeStateMachineTransition_w4gie")] -graph_offset = Vector2(-86, 54) +graph_offset = Vector2(-92, 35) [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vm050"] radius = 9.0 @@ -298,6 +299,7 @@ y_sort_enabled = true collision_layer = 5 motion_mode = 1 script = ExtResource("1_yavbv") +projectile = ExtResource("2_xodg4") [node name="Sprite2D" type="Sprite2D" parent="."] texture_filter = 1 @@ -316,7 +318,7 @@ parameters/conditions/melee = false parameters/conditions/range = false parameters/cut_walk/blend_position = Vector2(0.116751, -1.05556) parameters/hurt/blend_position = Vector2(0, -0.873016) -parameters/idle/blend_position = Vector2(-0.0152672, 0.85022) +parameters/idle/blend_position = Vector2(-0.183445, 0.227513) parameters/melee/blend_position = 0.0 parameters/melee/0/blend_position = Vector2(0.000877976, 0.862434) parameters/melee/1/blend_position = Vector2(-0.218698, 0.0434783) @@ -325,7 +327,6 @@ parameters/range_attack/blend_position = Vector2(0.910305, -0.026455) parameters/walk/blend_position = Vector2(-0.30916, 0.693122) [node name="Hitbox" type="Area2D" parent="."] -visible = false position = Vector2(0, 1) collision_layer = 2 collision_mask = 10 @@ -341,7 +342,6 @@ position = Vector2(-0.5, -1) shape = SubResource("RectangleShape2D_bdqvd") [node name="Attackbox" type="Area2D" parent="."] -visible = false position = Vector2(0, 1) collision_layer = 8 collision_mask = 2 @@ -354,7 +354,6 @@ disabled = true debug_color = Color(0.745098, 0.462745, 0, 0.419608) [node name="Meleebox" type="Area2D" parent="."] -visible = false collision_layer = 4 [node name="DetectionArea" type="CollisionShape2D" parent="Meleebox"] diff --git a/Reed/reed_animation.tres b/Reed/reed_animation.tres index 19b816e..8f38068 100644 --- a/Reed/reed_animation.tres +++ b/Reed/reed_animation.tres @@ -1991,6 +1991,20 @@ tracks/8/keys = { "update": 1, "values": [SubResource("CapsuleShape2D_m3ug4")] } +tracks/9/type = "method" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath(".") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0.2), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [Vector2(1, 0)], +"method": &"spawn_projectile" +}] +} [sub_resource type="Animation" id="Animation_i76f3"] resource_name = "range_north" @@ -2103,6 +2117,20 @@ tracks/8/keys = { "update": 1, "values": [SubResource("CapsuleShape2D_m3ug4")] } +tracks/9/type = "method" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath(".") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0.2), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [Vector2(0, -1)], +"method": &"spawn_projectile" +}] +} [sub_resource type="Animation" id="Animation_00yeq"] resource_name = "range_south" @@ -2215,6 +2243,20 @@ tracks/8/keys = { "update": 1, "values": [SubResource("CapsuleShape2D_m3ug4")] } +tracks/9/type = "method" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath(".") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0.2), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [Vector2(0, 1)], +"method": &"spawn_projectile" +}] +} [sub_resource type="Animation" id="Animation_8ftbb"] resource_name = "range_west" @@ -2327,6 +2369,20 @@ tracks/8/keys = { "update": 1, "values": [SubResource("CapsuleShape2D_m3ug4")] } +tracks/9/type = "method" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath(".") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0.2), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [Vector2(-1, 0)], +"method": &"spawn_projectile" +}] +} [sub_resource type="Animation" id="Animation_de3xn"] resource_name = "walking_east" diff --git a/Scripts/Audio/sound_manager.gd b/Scripts/Audio/sound_manager.gd index a065452..4f6c077 100644 --- a/Scripts/Audio/sound_manager.gd +++ b/Scripts/Audio/sound_manager.gd @@ -37,3 +37,6 @@ func _on_character_got_hurt(_new_health: int): func _on_humanoid_character_attacked(): play_sound("melee") + +func _on_reed_ai_range_attack_initiated(by): + play_sound("energy_blast") diff --git a/Scripts/hiro_ai.gd b/Scripts/hiro_ai.gd index 1cd83a6..d0cf3c1 100644 --- a/Scripts/hiro_ai.gd +++ b/Scripts/hiro_ai.gd @@ -1,6 +1,8 @@ class_name AICharacter extends CharacterBase +signal range_attack_initiated(by: CharacterBase) + @export_group("Combat") @export var player_character: PlayableCharacter @export var KNOCKBACK_REPOSITION_POWER = 75 @@ -11,7 +13,9 @@ extends CharacterBase @export var min_recoil_time = 3.0/60.0 @export var max_recoil_time = 1.0 @export var reduce_recoil_time_threshold = 58.0/60.0 - +@export var projectile: PackedScene +@export var PROJECTILE_SPEED = 100.0 +@export var PROJECTILE_POWER = 15 # Node components @onready var hitbox = $Hitbox @@ -61,7 +65,7 @@ func align_with_player(speed: float): if dist <= 0: # Aligned state_machine.send_event("will_range") - set_animation_direction(vector_to_player.normalized()) + set_animation_direction(Vector2(sign(vector_to_player.x), 0.0)) return else: movement_direction = Vector2.DOWN if vector_to_player.y > 0.0 else Vector2.UP @@ -71,13 +75,23 @@ func align_with_player(speed: float): if dist <= 0: # Aligned state_machine.send_event("will_range") - set_animation_direction(vector_to_player.normalized()) + set_animation_direction(Vector2(0.0, sign(vector_to_player.y))) return else: movement_direction = Vector2.RIGHT if vector_to_player.x > 0.0 else Vector2.LEFT velocity = movement_direction * speed set_animation_direction(movement_direction) +func spawn_projectile(direction: Vector2): + var instance = projectile.instantiate() + instance.direction = anim_tree.get("parameters/range_attack/blend_position") + instance.speed = PROJECTILE_SPEED + instance.position = global_position + instance.direction * 30.0 + instance.power = PROJECTILE_POWER + get_parent().add_child(instance) + instance.collided_with_area.connect(player_character._on_enemy_attack_did_hit) + range_attack_initiated.emit(self) + func _physics_process(delta: float): super._physics_process(delta) diff --git a/Scripts/linear_projectile.gd b/Scripts/linear_projectile.gd new file mode 100644 index 0000000..561e2bd --- /dev/null +++ b/Scripts/linear_projectile.gd @@ -0,0 +1,40 @@ +extends AnimatedSprite2D + +var direction: Vector2 +var speed: float +var power: int + +@onready var collider = $Collision +@onready var collision = $Collision/CollisionShape2D +@onready var timer = $Timer + +signal collided_with_area(other: Area2D, power: int, direction: Vector2) + +func _ready(): + flip_h = sign(direction.x) < 0 + flip_v = sign(direction.y) < 0 + if abs(direction.dot(Vector2.RIGHT)) == 0.0: + # Vertical + self.play(&"vertical") + else: + self.play(&"horizontal") + +func _physics_process(delta: float): + position += direction * speed * delta + +func _on_collision_area_entered(area): + _boom() + collided_with_area.emit(area, power, direction) + +func _on_timeout(): + queue_free() + +func _boom(): + timer.wait_time = 1.0 + play(&"hit") + speed = 0.0 + z_index = 1 + collision.set_deferred("disabled", true) + +func _on_collision_body_entered(body): + _boom() diff --git a/project.godot b/project.godot index 0a8f60e..722671d 100644 --- a/project.godot +++ b/project.godot @@ -117,6 +117,7 @@ pause={ 2d_physics/layer_3="Triggers" 2d_physics/layer_4="Attacks" 2d_physics/layer_5="World Movement" +2d_physics/layer_6="World Projectiles" [rendering] diff --git a/world/pillar.tscn b/world/pillar.tscn index 4b8ed10..a512c19 100644 --- a/world/pillar.tscn +++ b/world/pillar.tscn @@ -11,7 +11,7 @@ size = Vector2(8, 24) [node name="StaticBody2D" type="StaticBody2D" parent="."] texture_filter = 1 position = Vector2(0, -22) -collision_layer = 17 +collision_layer = 49 collision_mask = 17 [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] diff --git a/world/world.tscn b/world/world.tscn index deb3550..f2f105d 100644 --- a/world/world.tscn +++ b/world/world.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=42 format=3 uid="uid://bxuxjqxxqy7ce"] +[gd_scene load_steps=51 format=3 uid="uid://bxuxjqxxqy7ce"] [ext_resource type="PackedScene" uid="uid://di21xheryhp0k" path="res://Hiro/hiro_player.tscn" id="1_c1gpq"] [ext_resource type="PackedScene" uid="uid://b8sfype1vx5ad" path="res://Nem/nem_npc.tscn" id="1_sqt7d"] @@ -8,19 +8,28 @@ [ext_resource type="PackedScene" uid="uid://bcwkugn6v3oy7" path="res://addons/godot_state_charts/utilities/state_chart_debugger.tscn" id="2_o5str"] [ext_resource type="Resource" uid="uid://ck75kipijh0fn" path="res://Cutscenes/prototype_clone_victory.tres" id="3_f8ahk"] [ext_resource type="Texture2D" uid="uid://b40la2vyf4rn6" path="res://world/Fighting Dojo BG.png" id="4_elb6q"] +[ext_resource type="AudioStream" uid="uid://b72f2jvv2283j" path="res://Audio/SFX/dialog_page.wav" id="6_vecai"] +[ext_resource type="AudioStream" uid="uid://drossx2nhgeue" path="res://Audio/SFX/dialog_open.wav" id="7_lglyc"] [ext_resource type="Texture2D" uid="uid://dc12iaho4b8yl" path="res://world/walls.png" id="7_pp5dn"] [ext_resource type="PackedScene" uid="uid://c503u0i421w34" path="res://world/pillar.tscn" id="8_mxq55"] +[ext_resource type="AudioStream" uid="uid://darxacm0j1djh" path="res://Audio/SFX/door_open.wav" id="8_yj1fi"] [ext_resource type="Script" path="res://Scripts/explosion_generator.gd" id="9_df2wo"] +[ext_resource type="AudioStream" uid="uid://cvkvgyxqnksir" path="res://Audio/SFX/puff_smoke.wav" id="9_t7juh"] [ext_resource type="PackedScene" uid="uid://ce2tjyxwaar01" path="res://UI/battle_ui.tscn" id="10_hxn8m"] +[ext_resource type="AudioStream" uid="uid://di3fpfsl2vcyi" path="res://Audio/SFX/melee.tres" id="10_i31ta"] [ext_resource type="Texture2D" uid="uid://e7g3ylmbymwi" path="res://world/prototype_reward.png" id="10_qggmb"] [ext_resource type="PackedScene" uid="uid://6kq1081phjj8" path="res://UI/prototype_credits.tscn" id="11_2tmmx"] +[ext_resource type="AudioStream" uid="uid://dmpd83t5hrd81" path="res://Audio/SFX/melee_hit.tres" id="11_bh83s"] [ext_resource type="Texture2D" uid="uid://dbiqq00uaaev" path="res://world/prototype_reward_sfw.png" id="11_ni26m"] [ext_resource type="Texture2D" uid="uid://b7l1k8j3ie4qi" path="res://NPCs/npc1.png" id="11_p77ah"] [ext_resource type="PackedScene" uid="uid://7oi3hcf5q4o7" path="res://UI/textbox_ui.tscn" id="12_8pgvx"] [ext_resource type="Resource" uid="uid://ck0ry5vxaj8a7" path="res://Cutscenes/prototype_talk_to_nem.tres" id="12_cb4j5"] [ext_resource type="Texture2D" uid="uid://dym70eidamyel" path="res://NPCs/npc2.png" id="12_mlj32"] +[ext_resource type="AudioStream" uid="uid://bp70snfsk40vy" path="res://Audio/SFX/pause.wav" id="12_yh4x4"] +[ext_resource type="AudioStream" uid="uid://01sdb5n7snib" path="res://Audio/SFX/accept.wav" id="13_5hi8p"] [ext_resource type="Texture2D" uid="uid://y31qyw51y7hb" path="res://NPCs/npc3.png" id="13_6g4gt"] [ext_resource type="Texture2D" uid="uid://jnub86bpiebw" path="res://NPCs/npc4.png" id="14_46hs3"] +[ext_resource type="AudioStream" uid="uid://sgk7qu1ue4by" path="res://Audio/SFX/particle_projectile.wav" id="14_drye7"] [ext_resource type="Texture2D" uid="uid://baw6gijyxv1fv" path="res://NPCs/npc5.png" id="15_ppm1i"] [ext_resource type="Script" path="res://Scripts/lerping_camera.gd" id="16_6jycw"] [ext_resource type="Texture2D" uid="uid://bcvxfjlg8mmjr" path="res://NPCs/npc6.png" id="16_cgyrp"] @@ -133,6 +142,17 @@ cutscene = ExtResource("3_f8ahk") [node name="MusicManager" parent="." instance=ExtResource("24_03wyf")] [node name="SoundManager" parent="." instance=ExtResource("25_hm8b0")] +sounds = { +"dialogue_continue": ExtResource("6_vecai"), +"dialogue_open": ExtResource("7_lglyc"), +"door_open": ExtResource("8_yj1fi"), +"effect_smoke": ExtResource("9_t7juh"), +"energy_blast": ExtResource("14_drye7"), +"melee": ExtResource("10_i31ta"), +"melee_hit": ExtResource("11_bh83s"), +"pause": ExtResource("12_yh4x4"), +"unpause": ExtResource("13_5hi8p") +} [node name="GameState" type="Node" parent="."] process_mode = 3 @@ -306,7 +326,7 @@ has_nsfw_animations = false [node name="Camera2D" type="Camera2D" parent="HiroPlayer"] texture_filter = 1 -zoom = Vector2(2, 2) +zoom = Vector2(3, 3) position_smoothing_enabled = true position_smoothing_speed = 3.0 script = ExtResource("16_6jycw") @@ -340,11 +360,10 @@ attack_power = 10 [node name="BG Collissions" type="StaticBody2D" parent="."] z_index = 2 position = Vector2(-136, -190) -collision_layer = 17 -collision_mask = 17 +collision_layer = 49 +collision_mask = 25 [node name="Floor Collission" type="CollisionPolygon2D" parent="BG Collissions"] -visible = false position = Vector2(-1341, -243) scale = Vector2(8.83789, 4.22585) polygon = PackedVector2Array(158.522, 76.9076, 161.916, 75.961, 172.213, 75.961, 175.834, 76.671, 177.757, 78.5641, 179.341, 82.8236, 180.134, 85.8999, 180.134, 93.9456, 180.134, 114.06, 179.341, 117.373, 177.871, 119.739, 174.929, 120.922, 169.497, 120.922, 169.497, 123.525, 164.745, 123.525, 164.632, 120.922, 159.201, 120.922, 156.372, 120.213, 154.901, 117.373, 154.109, 113.587, 154.109, 94.1822, 154.109, 86.1365, 152.186, 83.0602, 152.412, 80.9304, 146.181, 70.3743, 139.513, 85.4266, 135.779, 90.8692, 147.66, 124.945, 187.367, 125.038, 195.514, 91.4351, 192.232, 66.1148, 173.676, 53.3363, 157.382, 53.8096, 152.404, 63.2751, 153.317, 81.6403, 154.109, 85.8999, 154.901, 83.2969, 156.485, 78.5641) @@ -456,8 +475,8 @@ polygon = PackedVector2Array(-84, -31, -76, -57, -43, -71, -84, -71) [connection signal="defeated" from="ShadowClone" to="." method="_on_shadow_clone_defeated"] [connection signal="got_hurt" from="ShadowClone" to="SoundManager" method="_on_character_got_hurt"] [connection signal="got_hurt" from="ShadowClone" to="CanvasLayer/BattleUI" method="_on_enemy_got_hurt"] -[connection signal="attack_did_hit" from="ReedAI" to="HiroPlayer" method="_on_enemy_attack_did_hit"] [connection signal="attacked" from="ReedAI" to="SoundManager" method="_on_humanoid_character_attacked"] [connection signal="defeated" from="ReedAI" to="." method="_on_reed_ai_defeated" flags=7] [connection signal="got_hurt" from="ReedAI" to="SoundManager" method="_on_character_got_hurt"] [connection signal="got_hurt" from="ReedAI" to="CanvasLayer/BattleUI" method="_on_enemy_got_hurt"] +[connection signal="range_attack_initiated" from="ReedAI" to="SoundManager" method="_on_reed_ai_range_attack_initiated"]