Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
🩹 Fix Enemy states.
Browse files Browse the repository at this point in the history
  • Loading branch information
LennyPhoenix committed Nov 30, 2020
1 parent 9db76e6 commit 7e40e00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
36 changes: 13 additions & 23 deletions Source/Entities/Enemies/Runner.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[ext_resource path="res://Assets/Entities/Enemies/Runner.png" type="Texture" id=2]
[ext_resource path="res://Source/Projectiles/EnemyBullet.tscn" type="PackedScene" id=3]

[sub_resource type="Animation" id=5]
[sub_resource type="Animation" id=1]
resource_name = "Die"
length = 0.3
tracks/0/type = "method"
Expand Down Expand Up @@ -46,8 +46,7 @@ tracks/2/keys = {
"values": [ Vector2( 0, 7 ), Vector2( 1, 7 ), Vector2( 2, 7 ) ]
}

[sub_resource type="Animation" id=1]
resource_name = "Idle"
[sub_resource type="Animation" id=2]
length = 0.25
loop = true
step = 0.25
Expand Down Expand Up @@ -76,8 +75,7 @@ tracks/1/keys = {
"values": [ Vector2( 0, 1 ) ]
}

[sub_resource type="Animation" id=2]
resource_name = "Move"
[sub_resource type="Animation" id=3]
loop = true
step = 0.25
tracks/0/type = "value"
Expand Down Expand Up @@ -105,8 +103,7 @@ tracks/1/keys = {
"values": [ Vector2( 0, 3 ), Vector2( 1, 3 ), Vector2( 2, 3 ), Vector2( 3, 3 ) ]
}

[sub_resource type="Animation" id=3]
resource_name = "Spawn"
[sub_resource type="Animation" id=4]
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Lights/Default:texture_scale")
Expand Down Expand Up @@ -181,7 +178,7 @@ tracks/5/keys = {
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}

[sub_resource type="Animation" id=4]
[sub_resource type="Animation" id=5]
loop = true
step = 0.25
tracks/0/type = "value"
Expand Down Expand Up @@ -219,29 +216,22 @@ MaxHealth = 75.0

[node name="AnimationPlayer" parent="." index="6"]
autoplay = "Spawn"
anims/Die = SubResource( 5 )
anims/Idle = SubResource( 1 )
anims/Move = SubResource( 2 )
anims/Spawn = SubResource( 3 )
anims/Sprint = SubResource( 4 )
anims/Die = SubResource( 1 )
anims/Idle = SubResource( 2 )
anims/Move = SubResource( 3 )
anims/Spawn = SubResource( 4 )
anims/Sprint = SubResource( 5 )

[node name="Default" parent="Lights" index="0"]
texture_scale = 1.5
energy = 0.2
energy = 0.4

[node name="OccluderOnly" parent="Lights" index="1"]
texture_scale = 0.75
energy = 0.2

[node name="Rotate" parent="." index="8"]
modulate = Color( 1, 1, 1, 0 )
scale = Vector2( 0.5, 0.5 )
energy = 0.4

[node name="Body" parent="Rotate" index="0"]
texture = ExtResource( 2 )
vframes = 8
hframes = 4
frame = 24

[node name="ProjectileEmitter" parent="Rotate" index="1"]
position = Vector2( 3, 6 )
Expand All @@ -252,4 +242,4 @@ AccuracySteps = 5
texture = ExtResource( 2 )
vframes = 8
hframes = 4
frame = 28
frame = 4
2 changes: 1 addition & 1 deletion Source/Entities/Entity.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ collision_mask = 33
script = ExtResource( 1 )

[node name="MapWrapper" parent="." instance=ExtResource( 6 )]
AdditionalOffsetPaths = [ NodePath("../Lights") ]
RootPath = NodePath("..")
AdditionalOffsetPaths = [ NodePath("../Lights") ]

[node name="HealthManager" parent="." instance=ExtResource( 2 )]
Collider = SubResource( 1 )
Expand Down

0 comments on commit 7e40e00

Please sign in to comment.