Added enemy chasing
This commit is contained in:
@@ -17,6 +17,7 @@ shader_parameter/scale = 20.0
|
||||
|
||||
[node name="BlackEnemy" instance=ExtResource("1_gj2ks")]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
script = ExtResource("2_332ds")
|
||||
|
||||
[node name="AnimatedSprite2D" parent="." index="0"]
|
||||
@@ -24,3 +25,23 @@ material = SubResource("ShaderMaterial_3jy5n")
|
||||
|
||||
[node name="CollisionSwitcher" parent="." index="2"]
|
||||
initial_state = 0
|
||||
|
||||
[node name="LeftWallRay" parent="WallCheck" index="0"]
|
||||
collision_mask = 3
|
||||
|
||||
[node name="RightWallRay" parent="WallCheck" index="1"]
|
||||
collision_mask = 3
|
||||
|
||||
[node name="LeftPlayerCloseRay" parent="PlayerCloseCheck" index="0"]
|
||||
target_position = Vector2(-32, 0)
|
||||
collision_mask = 8
|
||||
|
||||
[node name="RightPlayerCloseRay" parent="PlayerCloseCheck" index="1"]
|
||||
target_position = Vector2(32, 0)
|
||||
collision_mask = 8
|
||||
|
||||
[node name="LeftPlayerDistantRay" parent="PlayerDistantCheck" index="0"]
|
||||
collision_mask = 8
|
||||
|
||||
[node name="RightPlayerDistantRay" parent="PlayerDistantCheck" index="1"]
|
||||
collision_mask = 8
|
||||
|
||||
Reference in New Issue
Block a user