Compare commits
2 commits
25d21ceb9e
...
8401e8646a
Author | SHA1 | Date | |
---|---|---|---|
Mario Martínez | 8401e8646a | ||
Mario Martínez | 894f0f16e5 |
BIN
Audio/SFX/particle_projectile.wav
(Stored with Git LFS)
Normal file
BIN
Audio/SFX/particle_projectile.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
24
Audio/SFX/particle_projectile.wav.import
Normal file
24
Audio/SFX/particle_projectile.wav.import
Normal file
|
@ -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
|
152
Effects/energy_blast.tscn
Normal file
152
Effects/energy_blast.tscn
Normal file
|
@ -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"]
|
BIN
Effects/energy_shot.png
(Stored with Git LFS)
Normal file
BIN
Effects/energy_shot.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Effects/energy_shot.png.import
Normal file
34
Effects/energy_shot.png.import
Normal file
|
@ -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
|
BIN
Reed/Reed_Shooting_Sprite.png
(Stored with Git LFS)
Normal file
BIN
Reed/Reed_Shooting_Sprite.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
Reed/Reed_Shooting_Sprite.png.import
Normal file
34
Reed/Reed_Shooting_Sprite.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://84aonixufbg5"
|
||||
path="res://.godot/imported/Reed_Shooting_Sprite.png-838a9aca42835ed00963804fbd4b02a8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Reed/Reed_Shooting_Sprite.png"
|
||||
dest_files=["res://.godot/imported/Reed_Shooting_Sprite.png-838a9aca42835ed00963804fbd4b02a8.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,6 +1,7 @@
|
|||
[gd_scene load_steps=63 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"]
|
||||
|
@ -167,6 +168,29 @@ blend_point_2/node = SubResource("AnimationNodeBlendSpace2D_mr7t3")
|
|||
blend_point_2/pos = 1.0
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_taa1v"]
|
||||
animation = &"range_south"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_sxqbg"]
|
||||
animation = &"range_north"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ld7s8"]
|
||||
animation = &"range_west"
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_csipv"]
|
||||
animation = &"range_east"
|
||||
|
||||
[sub_resource type="AnimationNodeBlendSpace2D" id="AnimationNodeBlendSpace2D_ywu4e"]
|
||||
blend_point_0/node = SubResource("AnimationNodeAnimation_taa1v")
|
||||
blend_point_0/pos = Vector2(0, 1)
|
||||
blend_point_1/node = SubResource("AnimationNodeAnimation_sxqbg")
|
||||
blend_point_1/pos = Vector2(0, -1)
|
||||
blend_point_2/node = SubResource("AnimationNodeAnimation_ld7s8")
|
||||
blend_point_2/pos = Vector2(-1, 0)
|
||||
blend_point_3/node = SubResource("AnimationNodeAnimation_csipv")
|
||||
blend_point_3/pos = Vector2(1, 0)
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_17wsb"]
|
||||
animation = &"walking_north"
|
||||
|
||||
|
@ -217,6 +241,14 @@ advance_mode = 2
|
|||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ufuqv"]
|
||||
switch_mode = 2
|
||||
advance_mode = 2
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_w4gie"]
|
||||
advance_mode = 2
|
||||
advance_condition = &"range"
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_b0avg"]
|
||||
allow_transition_to_self = true
|
||||
states/End/position = Vector2(1026, 108)
|
||||
|
@ -228,15 +260,17 @@ states/defeated/position = Vector2(734, 202)
|
|||
states/defeated_loop/node = SubResource("AnimationNodeAnimation_0ny5g")
|
||||
states/defeated_loop/position = Vector2(895, 202)
|
||||
states/hurt/node = SubResource("AnimationNodeBlendSpace2D_h2vkc")
|
||||
states/hurt/position = Vector2(329, -13)
|
||||
states/hurt/position = Vector2(329, -9)
|
||||
states/idle/node = SubResource("AnimationNodeBlendSpace2D_bd8j1")
|
||||
states/idle/position = Vector2(329, 108)
|
||||
states/melee/node = SubResource("AnimationNodeBlendSpace1D_dc3kp")
|
||||
states/melee/position = Vector2(329, 224)
|
||||
states/melee/position = Vector2(257, 226)
|
||||
states/range_attack/node = SubResource("AnimationNodeBlendSpace2D_ywu4e")
|
||||
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")]
|
||||
graph_offset = Vector2(-62, -29)
|
||||
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(-92, 35)
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vm050"]
|
||||
radius = 9.0
|
||||
|
@ -265,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
|
||||
|
@ -280,14 +315,16 @@ libraries = {
|
|||
tree_root = SubResource("AnimationNodeStateMachine_b0avg")
|
||||
parameters/conditions/is_moving = false
|
||||
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.0197802, 0.62963)
|
||||
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)
|
||||
parameters/melee/2/blend_position = Vector2(0, 0)
|
||||
parameters/walk/blend_position = Vector2(-0.0021978, 0.78836)
|
||||
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="."]
|
||||
position = Vector2(0, 1)
|
||||
|
@ -352,6 +389,12 @@ to = NodePath("../../Melee")
|
|||
event = &"will_melee"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToAlign" type="Node" parent="StateMachine/Root/Think"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../AlignForRange")
|
||||
event = &"wants_torange"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToApproach" type="Node" parent="StateMachine/Root/Think"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Approach")
|
||||
|
@ -387,6 +430,12 @@ to = NodePath("../../Melee")
|
|||
event = &"will_melee"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToAlign" type="Node" parent="StateMachine/Root/Approach"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../AlignForRange")
|
||||
event = &"will_range"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToThink" type="Node" parent="StateMachine/Root/Approach"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Think")
|
||||
|
@ -414,7 +463,7 @@ to = NodePath("../../Melee")
|
|||
event = &"will_melee"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToThink" type="Node" parent="StateMachine/Root/Chase"]
|
||||
[node name="ToAlign" type="Node" parent="StateMachine/Root/Chase"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Think")
|
||||
event = &"melee_aborted"
|
||||
|
@ -471,6 +520,60 @@ to = NodePath("../../Think")
|
|||
event = &"hurt_complete"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="AlignForRange" type="Node" parent="StateMachine/Root"]
|
||||
script = ExtResource("7_jc1pg")
|
||||
|
||||
[node name="ToVictory" type="Node" parent="StateMachine/Root/AlignForRange"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Victory")
|
||||
event = &"has_won"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToHurt" type="Node" parent="StateMachine/Root/AlignForRange"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Hurt")
|
||||
event = &"been_hurt"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToRange" type="Node" parent="StateMachine/Root/AlignForRange"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Range")
|
||||
event = &"will_range"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToApproach" type="Node" parent="StateMachine/Root/AlignForRange"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Approach")
|
||||
event = &"will_melee"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToThink" type="Node" parent="StateMachine/Root/AlignForRange"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Think")
|
||||
event = &"range_aborted"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Range" type="Node" parent="StateMachine/Root"]
|
||||
script = ExtResource("7_jc1pg")
|
||||
|
||||
[node name="ToVictory" type="Node" parent="StateMachine/Root/Range"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Victory")
|
||||
event = &"has_won"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToHurt" type="Node" parent="StateMachine/Root/Range"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Hurt")
|
||||
event = &"been_hurt"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="ToThink" type="Node" parent="StateMachine/Root/Range"]
|
||||
script = ExtResource("8_713tw")
|
||||
to = NodePath("../../Think")
|
||||
event = &"range_complete"
|
||||
delay_in_seconds = "0.0"
|
||||
|
||||
[node name="Defeat" type="Node" parent="StateMachine/Root"]
|
||||
script = ExtResource("7_jc1pg")
|
||||
|
||||
|
@ -490,7 +593,7 @@ script = ExtResource("7_jc1pg")
|
|||
[connection signal="state_entered" from="StateMachine/Root/Chase" to="." method="_on_chase_state_entered"]
|
||||
[connection signal="state_exited" from="StateMachine/Root/Chase" to="." method="_on_chase_state_exited"]
|
||||
[connection signal="state_processing" from="StateMachine/Root/Chase" to="." method="_on_chase_state_processing"]
|
||||
[connection signal="taken" from="StateMachine/Root/Chase/ToThink" to="." method="_on_chase_to_think_taken"]
|
||||
[connection signal="taken" from="StateMachine/Root/Chase/ToAlign" to="." method="_on_chase_to_range_taken"]
|
||||
[connection signal="state_entered" from="StateMachine/Root/Melee" to="." method="_on_melee_state_entered"]
|
||||
[connection signal="state_exited" from="StateMachine/Root/Melee" to="." method="_on_melee_state_exited"]
|
||||
[connection signal="state_processing" from="StateMachine/Root/Melee" to="." method="_on_melee_state_processing"]
|
||||
|
@ -498,5 +601,10 @@ script = ExtResource("7_jc1pg")
|
|||
[connection signal="state_exited" from="StateMachine/Root/Hurt" to="." method="_on_hurt_state_exited"]
|
||||
[connection signal="state_entered" from="StateMachine/Root/HurtReposition" to="." method="_on_hurt_reposition_state_entered"]
|
||||
[connection signal="state_exited" from="StateMachine/Root/HurtReposition" to="." method="_on_hurt_reposition_state_exited"]
|
||||
[connection signal="state_entered" from="StateMachine/Root/AlignForRange" to="." method="_on_align_for_range_state_entered"]
|
||||
[connection signal="state_exited" from="StateMachine/Root/AlignForRange" to="." method="_on_align_for_range_state_exited"]
|
||||
[connection signal="state_processing" from="StateMachine/Root/AlignForRange" to="." method="_on_align_for_range_state_processing"]
|
||||
[connection signal="state_entered" from="StateMachine/Root/Range" to="." method="_on_range_state_entered"]
|
||||
[connection signal="state_exited" from="StateMachine/Root/Range" to="." method="_on_range_state_exited"]
|
||||
[connection signal="state_entered" from="StateMachine/Root/Defeat" to="." method="_on_defeat_state_entered"]
|
||||
[connection signal="state_entered" from="StateMachine/Root/Victory" to="." method="_on_victory_state_entered"]
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
[gd_resource type="AnimationLibrary" load_steps=35 format=3 uid="uid://bhg3cnhjeq85r"]
|
||||
[gd_resource type="AnimationLibrary" load_steps=40 format=3 uid="uid://bhg3cnhjeq85r"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://pittqsk5eskq" path="res://Reed/Reed Walk Sprite Cycle Line Up.png" id="1_4xts1"]
|
||||
[ext_resource type="Texture2D" uid="uid://clbdgd8f7isb4" path="res://Reed/Reed_Reed_Defeated_Sprite_.png" id="2_7ny10"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7q83hvbvaifu" path="res://Reed/Reed_Hurt_Sprites.png" id="3_ynckf"]
|
||||
[ext_resource type="Texture2D" uid="uid://bmix77hgm7q21" path="res://Reed/Reed_Idle_Blink_Sprites.png" id="4_peeea"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctajre4ylwoqp" path="res://Reed/Reed_Melee_Sprites_Y.png" id="4_uq1j6"]
|
||||
[ext_resource type="Texture2D" uid="uid://84aonixufbg5" path="res://Reed/Reed_Shooting_Sprite.png" id="6_mmn82"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_m3ug4"]
|
||||
height = 20.0
|
||||
|
@ -1879,6 +1880,510 @@ tracks/6/keys = {
|
|||
"values": [Vector2(0, -11), Vector2(-4, -14), Vector2(12, -11), Vector2(-4, -14), Vector2(-0.00060463, -11)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_fx2sq"]
|
||||
resource_name = "range_east"
|
||||
length = 0.60001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [ExtResource("6_mmn82")]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D:hframes")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite2D:vframes")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Attackbox/Collider:position")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0666667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, -10), Vector2(0, -14)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("Attackbox/Collider:disabled")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("Sprite2D:material:shader_parameter/FlashColor")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 0, 0, 0)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("Sprite2D:frame")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [5, 6, 7, 6]
|
||||
}
|
||||
tracks/8/type = "value"
|
||||
tracks/8/imported = false
|
||||
tracks/8/enabled = true
|
||||
tracks/8/path = NodePath("Attackbox/Collider:shape")
|
||||
tracks/8/interp = 1
|
||||
tracks/8/loop_wrap = true
|
||||
tracks/8/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"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"
|
||||
length = 0.60001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [ExtResource("6_mmn82")]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D:hframes")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite2D:vframes")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Attackbox/Collider:position")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0666667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, -10), Vector2(0, -14)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("Attackbox/Collider:disabled")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("Sprite2D:material:shader_parameter/FlashColor")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 0, 0, 0)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("Sprite2D:frame")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [9, 10, 11, 10]
|
||||
}
|
||||
tracks/8/type = "value"
|
||||
tracks/8/imported = false
|
||||
tracks/8/enabled = true
|
||||
tracks/8/path = NodePath("Attackbox/Collider:shape")
|
||||
tracks/8/interp = 1
|
||||
tracks/8/loop_wrap = true
|
||||
tracks/8/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"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"
|
||||
length = 0.60001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [ExtResource("6_mmn82")]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D:hframes")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite2D:vframes")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Attackbox/Collider:position")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0666667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, -10), Vector2(0, -14)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("Attackbox/Collider:disabled")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("Sprite2D:material:shader_parameter/FlashColor")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 0, 0, 0)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("Sprite2D:frame")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [1, 2, 3, 2]
|
||||
}
|
||||
tracks/8/type = "value"
|
||||
tracks/8/imported = false
|
||||
tracks/8/enabled = true
|
||||
tracks/8/path = NodePath("Attackbox/Collider:shape")
|
||||
tracks/8/interp = 1
|
||||
tracks/8/loop_wrap = true
|
||||
tracks/8/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"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"
|
||||
length = 0.60001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:texture")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [ExtResource("6_mmn82")]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("Sprite2D:hframes")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Sprite2D:vframes")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [4]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("AnimationTree:parameters/conditions/melee")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("Attackbox/Collider:position")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0, 0.0666667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, -10), Vector2(0, -14)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("Attackbox/Collider:disabled")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("Sprite2D:material:shader_parameter/FlashColor")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 0, 0, 0)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("Sprite2D:frame")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [13, 14, 15, 14]
|
||||
}
|
||||
tracks/8/type = "value"
|
||||
tracks/8/imported = false
|
||||
tracks/8/enabled = true
|
||||
tracks/8/path = NodePath("Attackbox/Collider:shape")
|
||||
tracks/8/interp = 1
|
||||
tracks/8/loop_wrap = true
|
||||
tracks/8/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"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"
|
||||
length = 0.500013
|
||||
|
@ -2121,6 +2626,10 @@ _data = {
|
|||
"punch_south_rigth": SubResource("Animation_bw220"),
|
||||
"punch_west_left": SubResource("Animation_wjl2t"),
|
||||
"punch_west_rigth": SubResource("Animation_e4rxs"),
|
||||
"range_east": SubResource("Animation_fx2sq"),
|
||||
"range_north": SubResource("Animation_i76f3"),
|
||||
"range_south": SubResource("Animation_00yeq"),
|
||||
"range_west": SubResource("Animation_8ftbb"),
|
||||
"walking_east": SubResource("Animation_de3xn"),
|
||||
"walking_north": SubResource("Animation_bg701"),
|
||||
"walking_south": SubResource("Animation_sroq6"),
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
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
|
||||
@export var MELEE_RADIUS = 75
|
||||
@export var chase_speed = 65
|
||||
@export var approach_speed = 40
|
||||
@export var align_speed = 40
|
||||
@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
|
||||
|
@ -42,12 +47,50 @@ func set_animation_direction(facing_direction: Vector2):
|
|||
anim_tree.set("parameters/melee/1/blend_position", facing_direction)
|
||||
anim_tree.set("parameters/melee/2/blend_position", facing_direction)
|
||||
anim_tree.set("parameters/hurt/blend_position", facing_direction)
|
||||
anim_tree.set("parameters/range_attack/blend_position", facing_direction)
|
||||
anim_tree.set("parameters/cut_walk/blend_position", facing_direction)
|
||||
|
||||
func follow_player(speed: float):
|
||||
var approach_direction = global_position.direction_to(player_character.global_position)
|
||||
velocity = speed * approach_direction
|
||||
set_animation_direction(approach_direction)
|
||||
|
||||
func align_with_player(speed: float):
|
||||
var vector_to_player = player_character.global_position - global_position
|
||||
var movement_direction: Vector2
|
||||
var dist = 0.0
|
||||
if abs(vector_to_player.y) < abs(vector_to_player.x):
|
||||
# Moving vertically
|
||||
dist = abs(vector_to_player.y) - 1.0
|
||||
if dist <= 0:
|
||||
# Aligned
|
||||
state_machine.send_event("will_range")
|
||||
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
|
||||
else:
|
||||
# Moving horizontally
|
||||
dist = abs(vector_to_player.x) - 1.0
|
||||
if dist <= 0:
|
||||
# Aligned
|
||||
state_machine.send_event("will_range")
|
||||
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)
|
||||
|
@ -86,9 +129,9 @@ func _on_think_state_processing(delta):
|
|||
## This function actually determines what to do
|
||||
func do_thinking():
|
||||
var distance = position.distance_to(player_character.position)
|
||||
if distance > MELEE_RADIUS:
|
||||
if distance >= MELEE_RADIUS:
|
||||
state_machine.set_expression_property("melee_stage", 0)
|
||||
# range attacks here
|
||||
state_machine.send_event("wants_torange")
|
||||
else:
|
||||
state_machine.send_event("wants_tomelee")
|
||||
|
||||
|
@ -149,6 +192,8 @@ func _on_hurt_reposition_state_exited():
|
|||
func _on_animation_tree_animation_finished(anim_name):
|
||||
if anim_name.contains("hurt"):
|
||||
state_machine.send_event("hurt_complete")
|
||||
elif anim_name.contains("range"):
|
||||
state_machine.send_event("range_complete")
|
||||
elif (anim_name.contains("kick") or anim_name.contains("punch")):
|
||||
attack_counter = attack_counter + 1
|
||||
wants_to_melee = wants_to_melee and attack_counter < attack_counter_limit
|
||||
|
@ -175,6 +220,9 @@ func _on_approach_state_entered():
|
|||
func _on_approach_state_processing(delta):
|
||||
timer -= delta
|
||||
if timer < 0:
|
||||
var distance = global_position.distance_to(player_character.global_position)
|
||||
if distance >= MELEE_RADIUS:
|
||||
state_machine.send_event("wants_torange")
|
||||
state_machine.send_event("approach_complete")
|
||||
|
||||
|
||||
|
@ -200,7 +248,7 @@ func _on_chase_state_exited():
|
|||
anim_tree.set("parameters/conditions/is_moving", false)
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
func _on_chase_to_think_taken():
|
||||
func _on_chase_to_range_taken():
|
||||
state_machine.set_expression_property("melee_stage", 0)
|
||||
|
||||
## Melee
|
||||
|
@ -237,3 +285,22 @@ func _on_victory_state_entered():
|
|||
|
||||
func _on_player_been_defeated():
|
||||
state_machine.send_event("has_won")
|
||||
|
||||
func _on_align_for_range_state_entered():
|
||||
anim_tree.set("parameters/conditions/is_moving", true)
|
||||
|
||||
func _on_align_for_range_state_exited():
|
||||
anim_tree.set("parameters/conditions/is_moving", false)
|
||||
|
||||
func _on_align_for_range_state_processing(delta):
|
||||
align_with_player(align_speed)
|
||||
var distance = position.distance_to(player_character.position)
|
||||
if distance < MELEE_RADIUS:
|
||||
state_machine.send_event("will_melee")
|
||||
|
||||
func _on_range_state_entered():
|
||||
velocity = Vector2.ZERO
|
||||
anim_tree.set("parameters/conditions/range", true)
|
||||
|
||||
func _on_range_state_exited():
|
||||
anim_tree.set("parameters/conditions/range", false)
|
||||
|
|
40
Scripts/linear_projectile.gd
Normal file
40
Scripts/linear_projectile.gd
Normal file
|
@ -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()
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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"]
|
||||
|
@ -6,21 +6,30 @@
|
|||
[ext_resource type="FontFile" uid="uid://bgqotudi6bifk" path="res://UI/Gundam 00 font gaufont.ttf" id="2_64thh"]
|
||||
[ext_resource type="Script" path="res://Scripts/UI/pause_menu.gd" id="2_nw73f"]
|
||||
[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://bj3rm1r1ouq0r" path="res://Cutscenes/prototype_start.tres" id="3_i6m8h"]
|
||||
[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"]
|
||||
|
@ -128,11 +137,22 @@ script = ExtResource("1_y634h")
|
|||
|
||||
[node name="CutsceneManager" type="Node" parent="."]
|
||||
script = ExtResource("19_5yvrq")
|
||||
cutscene = ExtResource("3_i6m8h")
|
||||
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
|
||||
|
@ -231,7 +251,6 @@ layout_mode = 1
|
|||
[node name="BattleUI" parent="CanvasLayer" instance=ExtResource("10_hxn8m")]
|
||||
|
||||
[node name="Debug" type="Control" parent="CanvasLayer"]
|
||||
visible = false
|
||||
layout_mode = 3
|
||||
anchor_left = 0.667
|
||||
anchor_right = 1.0
|
||||
|
@ -245,7 +264,6 @@ offset_right = 81.24
|
|||
offset_bottom = 155.0
|
||||
scale = Vector2(0.75, 0.75)
|
||||
size_flags_horizontal = 0
|
||||
enabled = false
|
||||
initial_node_to_watch = NodePath("../../../ReedAI")
|
||||
|
||||
[node name="MapElements" type="Node2D" parent="."]
|
||||
|
@ -333,7 +351,7 @@ attack_power = 10
|
|||
position = Vector2(-55, 283)
|
||||
player_character = NodePath("../HiroPlayer")
|
||||
KNOCKBACK_REPOSITION_POWER = 90
|
||||
MELEE_RADIUS = 300
|
||||
MELEE_RADIUS = 105
|
||||
reduce_recoil_time_threshold = 0.75
|
||||
max_health = 400
|
||||
health = 400
|
||||
|
@ -342,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)
|
||||
|
@ -458,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"]
|
||||
|
|
Loading…
Reference in a new issue