fixed slime collision issues

This commit is contained in:
2023-02-26 19:02:14 +01:00
parent a118a259c9
commit a94ee84718
2 changed files with 6 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ layer_1/modulate = Color(1, 1, 1, 1)
layer_1/y_sort_enabled = true
layer_1/y_sort_origin = 0
layer_1/z_index = 0
layer_1/tile_data = PackedInt32Array(-262141, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -262138, 0, 0, -262139, 0, 0, -262140, 0, 0, -6, 0, 131072, -262150, 0, 196608, 4, 0, 65536, -851992, 5, 65536)
layer_1/tile_data = PackedInt32Array(-262141, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -262138, 0, 0, -262139, 0, 0, -262140, 0, 0, -6, 0, 131072, -262150, 0, 196608, 4, 0, 65536, 131074, 5, 65536, 262144, 5, 65536)
metadata/_edit_lock_ = true
[node name="player" parent="." instance=ExtResource("2_0skrb")]

View File

@@ -11,6 +11,9 @@ var motion = Vector2.ZERO
var player = null
func _ready():
$animated_sprite_2d.play()
func _physics_process(_delta):
motion = Vector2.ZERO
if player:
@@ -65,6 +68,8 @@ height = 56.0
radius = 440.41
[node name="slime" type="CharacterBody2D"]
collision_layer = 9
collision_mask = 8
script = SubResource("GDScript_78jn1")
[node name="animated_sprite_2d" type="AnimatedSprite2D" parent="."]