Added the bunny! WIP. Has issues with turning around
This commit is contained in:
+144
@@ -0,0 +1,144 @@
|
||||
[gd_scene format=3 uid="uid://gmne5t7xj3ta"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://br5jkh3x703qw" path="res://bunny.gd" id="1_dvrf6"]
|
||||
[ext_resource type="Texture2D" uid="uid://nr1dxc1p6fe8" path="res://assets/images/Bunny/BunnyRun-Sheet.png" id="1_u834r"]
|
||||
[ext_resource type="Texture2D" uid="uid://bl55ade1p47rf" path="res://assets/images/Bunny/BunnyIdle-Sheet.png" id="2_e4qck"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5ecvt"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qx6ai"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(32, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jsbfh"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(64, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g5rs1"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(96, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_76uj3"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(128, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_11snv"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(160, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_km0dj"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(192, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6sma1"]
|
||||
atlas = ExtResource("2_e4qck")
|
||||
region = Rect2(224, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dvrf6"]
|
||||
atlas = ExtResource("1_u834r")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_e4qck"]
|
||||
atlas = ExtResource("1_u834r")
|
||||
region = Rect2(32, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gs0sc"]
|
||||
atlas = ExtResource("1_u834r")
|
||||
region = Rect2(64, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g7ptr"]
|
||||
atlas = ExtResource("1_u834r")
|
||||
region = Rect2(96, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vonwv"]
|
||||
atlas = ExtResource("1_u834r")
|
||||
region = Rect2(128, 0, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_5ecvt"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5ecvt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qx6ai")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jsbfh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g5rs1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_76uj3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_11snv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_km0dj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6sma1")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dvrf6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_e4qck")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gs0sc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g7ptr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vonwv")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"run",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_u834r"]
|
||||
size = Vector2(19, 21)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_e4qck"]
|
||||
size = Vector2(14, 4)
|
||||
|
||||
[node name="Bunny" type="Node2D" unique_id=1276098802]
|
||||
script = ExtResource("1_dvrf6")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=623860503]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_5ecvt")
|
||||
animation = &"idle"
|
||||
autoplay = "run"
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="." unique_id=83756394]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=286806552]
|
||||
visible = false
|
||||
position = Vector2(-0.5, -0.5)
|
||||
shape = SubResource("RectangleShape2D_u834r")
|
||||
|
||||
[node name="WaitTimer" type="Timer" parent="." unique_id=618329498]
|
||||
one_shot = true
|
||||
|
||||
[node name="DeathBox" type="Area2D" parent="." unique_id=78599148]
|
||||
|
||||
[node name="DeathCollisionBox" type="CollisionShape2D" parent="DeathBox" unique_id=993689400]
|
||||
position = Vector2(-3, -8)
|
||||
shape = SubResource("RectangleShape2D_e4qck")
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||||
[connection signal="timeout" from="WaitTimer" to="." method="_on_wait_timer_timeout"]
|
||||
[connection signal="body_entered" from="DeathBox" to="." method="_on_death_box_body_entered"]
|
||||
Reference in New Issue
Block a user