bovido/scenes/enemy.tscn
Mathilde Grapin 7038d29d87 First commit
Add simple player movement with a finite state machine.
Add enemy that can move to target point.
Add ground through a tilemap and wall that player and enemy cannot
cross.
2023-06-11 23:38:54 +02:00

48 lines
1.3 KiB
Plaintext

[gd_scene load_steps=6 format=3 uid="uid://bktg1ypaav3q3"]
[ext_resource type="Texture2D" uid="uid://bbwsdd0jddmck" path="res://art/Pink_Monster_Walk_6.png" id="1_e5603"]
[ext_resource type="Script" path="res://scripts/enemy.gd" id="1_l5lyv"]
[sub_resource type="Animation" id="Animation_etqki"]
resource_name = "walk"
length = 0.6
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_gnukq"]
_data = {
"walk": SubResource("Animation_etqki")
}
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rlijp"]
size = Vector2(17, 10)
[node name="Enemy" type="CharacterBody2D"]
script = ExtResource("1_l5lyv")
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0, -16)
texture = ExtResource("1_e5603")
flip_h = true
hframes = 6
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_gnukq")
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.5, -5)
shape = SubResource("RectangleShape2D_rlijp")