-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSlimeEnemy.tscn
98 lines (79 loc) · 3.18 KB
/
SlimeEnemy.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[gd_scene load_steps=15 format=2]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile010.png" type="Texture" id=1]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile012.png" type="Texture" id=2]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile011.png" type="Texture" id=3]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile016.png" type="Texture" id=4]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile015.png" type="Texture" id=5]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile019.png" type="Texture" id=6]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile013.png" type="Texture" id=7]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile017.png" type="Texture" id=8]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile018.png" type="Texture" id=9]
[ext_resource path="res://SlimeEnemy/BlueSlimeJumpAttack/tile014.png" type="Texture" id=10]
[sub_resource type="CSharpScript" id=1]
resource_name = "SlimeEnemy"
script/source = "using Godot;
using System;
public class SlimeEnemy : KinematicBody2D
{
// Declare member variables here. Examples:
// private int a = 2;
// private string b = \"text\";
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
}
// // Called every frame. 'delta' is the elapsed time since the previous frame.
// public override void _Process(float delta)
// {
//
// }
}
"
[sub_resource type="SpriteFrames" id=4]
animations = [ {
"frames": [ ExtResource( 1 ), ExtResource( 3 ), ExtResource( 2 ), ExtResource( 7 ), ExtResource( 10 ), ExtResource( 5 ), ExtResource( 4 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 6 ) ],
"loop": true,
"name": "Jump",
"speed": 8.0
} ]
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 7, 10 )
[sub_resource type="CapsuleShape2D" id=5]
radius = 7.0
height = 8.0
[node name="SlimeEnemy" type="KinematicBody2D"]
script = SubResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 0, -0.25 )
scale = Vector2( 1, 0.982759 )
frames = SubResource( 4 )
animation = "Jump"
frame = 1
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, 4 )
shape = SubResource( 3 )
[node name="RayCastLeft" type="RayCast2D" parent="."]
position = Vector2( -6, 7 )
enabled = true
cast_to = Vector2( 0, 10 )
[node name="RayCastRight" type="RayCast2D" parent="."]
position = Vector2( 6, 7 )
enabled = true
cast_to = Vector2( 0, 10 )
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 0, 3 )
shape = SubResource( 5 )
[node name="RayCastMiddleLeft" type="RayCast2D" parent="."]
position = Vector2( -6, 7 )
rotation = 1.5708
enabled = true
cast_to = Vector2( 0, 10 )
collision_mask = 2
[node name="RayCastMiddleRight" type="RayCast2D" parent="."]
position = Vector2( 6, 7 )
rotation = -1.5708
enabled = true
cast_to = Vector2( 0, 10 )
collision_mask = 2
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]