-
Notifications
You must be signed in to change notification settings - Fork 0
/
Enemy.tscn
49 lines (39 loc) · 1.23 KB
/
Enemy.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[gd_scene load_steps=7 format=2]
[ext_resource path="res://assets/characters_packed.png" type="Texture" id=1]
[ext_resource path="res://Enemy.gd" type="Script" id=2]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 144, 24, 24, 24 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 168, 24, 24, 24 )
[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
"loop": true,
"name": "walking",
"speed": 5.0
} ]
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 5.5, 5 )
[node name="Enemy" type="KinematicBody2D"]
collision_layer = 2
script = ExtResource( 2 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 0, -12 )
frames = SubResource( 3 )
animation = "walking"
playing = true
flip_h = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, -6 )
shape = SubResource( 4 )
[node name="LedgeCheckLeft" type="RayCast2D" parent="."]
position = Vector2( -5, -1 )
enabled = true
cast_to = Vector2( 0, 4 )
collide_with_areas = true
[node name="LedgeCheckRight" type="RayCast2D" parent="."]
position = Vector2( 5, -1 )
enabled = true
cast_to = Vector2( 0, 4 )