-
Notifications
You must be signed in to change notification settings - Fork 0
/
WalkingEnemy.tscn
56 lines (44 loc) · 1.6 KB
/
WalkingEnemy.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
50
51
52
53
54
55
56
[gd_scene load_steps=8 format=2]
[ext_resource path="res://characters_packed.png" type="Texture" id=1]
[ext_resource path="res://WalkingEnemy.gd" type="Script" id=2]
[ext_resource path="res://Hitbox.tscn" type="PackedScene" id=3]
[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( 4.5, 4 )
[node name="WalkingEnemy" type="KinematicBody2D"]
collision_layer = 2
script = ExtResource( 2 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( -9.53674e-07, -9 )
scale = Vector2( 0.75, 0.75 )
frames = SubResource( 3 )
animation = "Walking"
flip_h = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, -4 )
shape = SubResource( 4 )
[node name="ledgecheckright" type="RayCast2D" parent="."]
position = Vector2( 4, -1 )
enabled = true
cast_to = Vector2( 0, 4 )
collide_with_areas = true
[node name="ledgecheckleft" type="RayCast2D" parent="."]
position = Vector2( -5, -1 )
enabled = true
cast_to = Vector2( 0, 4 )
collide_with_areas = true
[node name="Hitbox" parent="." instance=ExtResource( 3 )]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hitbox"]
polygon = PoolVector2Array( -4, -2, -4, -8, -2, -8, -1, -8, -1, -11, 0, -12, 1, -12, 2, -11, 2, -8, 5, -8, 5, -1, -4, -1 )