Demon work
This commit is contained in:
parent
013c5f0cfd
commit
a84dc5f4a1
|
@ -5,7 +5,7 @@ resource_name = "Skeleton Hit"
|
||||||
length = 0.1
|
length = 0.1
|
||||||
step = 0.05
|
step = 0.05
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/path = NodePath("Skeleton:modulate")
|
tracks/0/path = NodePath("../Skeleton Enemy/Skeleton:modulate")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
|
|
|
@ -22,8 +22,10 @@ func _physics_process(_delta):
|
||||||
|
|
||||||
PlayerRaycast.cast_to = player_position - global_position
|
PlayerRaycast.cast_to = player_position - global_position
|
||||||
var collider = PlayerRaycast.get_collider()
|
var collider = PlayerRaycast.get_collider()
|
||||||
if collider != null && collider.has_method("get_type") && collider.get_type() == "player":
|
|
||||||
shoot_fireball(position.direction_to(player_position))
|
if dist <= 200:
|
||||||
|
if collider != null && collider.has_method("get_type") && collider.get_type() == "player":
|
||||||
|
shoot_fireball(position.direction_to(player_position))
|
||||||
|
|
||||||
if dist <= 200:
|
if dist <= 200:
|
||||||
velocity.x = position.direction_to(player_position).normalized().x * speed
|
velocity.x = position.direction_to(player_position).normalized().x * speed
|
||||||
|
|
|
@ -94,12 +94,13 @@ __meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Skeleton Enemy" parent="." instance=ExtResource( 3 )]
|
||||||
margin_right = 40.0
|
position = Vector2( 357, 167 )
|
||||||
margin_bottom = 14.0
|
|
||||||
__meta__ = {
|
[node name="Timer" type="Timer" parent="."]
|
||||||
"_edit_use_anchors_": false
|
wait_time = 4.386
|
||||||
}
|
one_shot = true
|
||||||
|
script = ExtResource( 10 )
|
||||||
[connection signal="body_entered" from="Leap" to="AnimationPlayer2" method="_on_Leap_body_entered"]
|
[connection signal="body_entered" from="Leap" to="AnimationPlayer2" method="_on_Leap_body_entered"]
|
||||||
[connection signal="body_entered" from="Leap" to="AnimationPlayer" method="_on_Leap_body_entered"]
|
[connection signal="body_entered" from="Leap" to="AnimationPlayer" method="_on_Leap_body_entered"]
|
||||||
[connection signal="body_entered" from="Leap" to="Timer" method="_on_Leap_body_entered"]
|
[connection signal="body_entered" from="Leap" to="Timer" method="_on_Leap_body_entered"]
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue