|
| 1 | +[gd_scene load_steps=31 format=3 uid="uid://bou6rky8jvdmr"] |
| 2 | + |
| 3 | +[ext_resource type="Texture2D" uid="uid://b5s8lkrg0j0j1" path="res://assets/Resources/Sheep/HappySheep_Idle.png" id="1_lgovn"] |
| 4 | +[ext_resource type="Script" path="res://scripts/sheep.gd" id="1_qs77e"] |
| 5 | +[ext_resource type="PackedScene" uid="uid://io7jjehpxqir" path="res://scenes/components/hitbox_component.tscn" id="2_oxvx7"] |
| 6 | +[ext_resource type="Script" path="res://scripts/health_component.gd" id="2_ycipw"] |
| 7 | +[ext_resource type="Texture2D" uid="uid://cpaof3cgh5w80" path="res://assets/Resources/Sheep/HappySheep_Bouncing.png" id="3_1upnk"] |
| 8 | +[ext_resource type="PackedScene" uid="uid://bu2pk8tju85xu" path="res://scenes/health_bar.tscn" id="4_krxru"] |
| 9 | +[ext_resource type="PackedScene" uid="uid://dvle86etxch48" path="res://scenes/components/knockback_component.tscn" id="5_qflnu"] |
| 10 | +[ext_resource type="PackedScene" uid="uid://cboi10dwwujxm" path="res://prefabs/effects/hit_animation.tscn" id="6_tfhpn"] |
| 11 | +[ext_resource type="Script" path="res://scripts/drop_items.gd" id="7_3b5mt"] |
| 12 | +[ext_resource type="PackedScene" uid="uid://dsb8p4ysfqkdi" path="res://prefabs/meat.tscn" id="8_pxsnm"] |
| 13 | +[ext_resource type="Script" path="res://scripts/state_machine.gd" id="9_ya02d"] |
| 14 | +[ext_resource type="Script" path="res://scripts/idle.gd" id="10_liamn"] |
| 15 | +[ext_resource type="Script" path="res://scripts/escape.gd" id="12_rqfsc"] |
| 16 | + |
| 17 | +[sub_resource type="AtlasTexture" id="AtlasTexture_xy5yh"] |
| 18 | +atlas = ExtResource("1_lgovn") |
| 19 | +region = Rect2(0, 0, 128, 128) |
| 20 | + |
| 21 | +[sub_resource type="AtlasTexture" id="AtlasTexture_30g1r"] |
| 22 | +atlas = ExtResource("1_lgovn") |
| 23 | +region = Rect2(128, 0, 128, 128) |
| 24 | + |
| 25 | +[sub_resource type="AtlasTexture" id="AtlasTexture_f8ctw"] |
| 26 | +atlas = ExtResource("1_lgovn") |
| 27 | +region = Rect2(256, 0, 128, 128) |
| 28 | + |
| 29 | +[sub_resource type="AtlasTexture" id="AtlasTexture_ml2t2"] |
| 30 | +atlas = ExtResource("1_lgovn") |
| 31 | +region = Rect2(384, 0, 128, 128) |
| 32 | + |
| 33 | +[sub_resource type="AtlasTexture" id="AtlasTexture_xj7wv"] |
| 34 | +atlas = ExtResource("1_lgovn") |
| 35 | +region = Rect2(512, 0, 128, 128) |
| 36 | + |
| 37 | +[sub_resource type="AtlasTexture" id="AtlasTexture_gm8by"] |
| 38 | +atlas = ExtResource("1_lgovn") |
| 39 | +region = Rect2(640, 0, 128, 128) |
| 40 | + |
| 41 | +[sub_resource type="AtlasTexture" id="AtlasTexture_6n2fs"] |
| 42 | +atlas = ExtResource("1_lgovn") |
| 43 | +region = Rect2(768, 0, 128, 128) |
| 44 | + |
| 45 | +[sub_resource type="AtlasTexture" id="AtlasTexture_mm1e4"] |
| 46 | +atlas = ExtResource("1_lgovn") |
| 47 | +region = Rect2(896, 0, 128, 128) |
| 48 | + |
| 49 | +[sub_resource type="AtlasTexture" id="AtlasTexture_3ik0p"] |
| 50 | +atlas = ExtResource("3_1upnk") |
| 51 | +region = Rect2(0, 0, 128, 128) |
| 52 | + |
| 53 | +[sub_resource type="AtlasTexture" id="AtlasTexture_g164v"] |
| 54 | +atlas = ExtResource("3_1upnk") |
| 55 | +region = Rect2(128, 0, 128, 128) |
| 56 | + |
| 57 | +[sub_resource type="AtlasTexture" id="AtlasTexture_7h4s2"] |
| 58 | +atlas = ExtResource("3_1upnk") |
| 59 | +region = Rect2(256, 0, 128, 128) |
| 60 | + |
| 61 | +[sub_resource type="AtlasTexture" id="AtlasTexture_5eihk"] |
| 62 | +atlas = ExtResource("3_1upnk") |
| 63 | +region = Rect2(384, 0, 128, 128) |
| 64 | + |
| 65 | +[sub_resource type="AtlasTexture" id="AtlasTexture_6f568"] |
| 66 | +atlas = ExtResource("3_1upnk") |
| 67 | +region = Rect2(512, 0, 128, 128) |
| 68 | + |
| 69 | +[sub_resource type="AtlasTexture" id="AtlasTexture_nplwa"] |
| 70 | +atlas = ExtResource("3_1upnk") |
| 71 | +region = Rect2(640, 0, 128, 128) |
| 72 | + |
| 73 | +[sub_resource type="SpriteFrames" id="SpriteFrames_uweta"] |
| 74 | +animations = [{ |
| 75 | +"frames": [{ |
| 76 | +"duration": 1.0, |
| 77 | +"texture": SubResource("AtlasTexture_xy5yh") |
| 78 | +}, { |
| 79 | +"duration": 1.0, |
| 80 | +"texture": SubResource("AtlasTexture_30g1r") |
| 81 | +}, { |
| 82 | +"duration": 1.0, |
| 83 | +"texture": SubResource("AtlasTexture_f8ctw") |
| 84 | +}, { |
| 85 | +"duration": 1.0, |
| 86 | +"texture": SubResource("AtlasTexture_ml2t2") |
| 87 | +}, { |
| 88 | +"duration": 1.0, |
| 89 | +"texture": SubResource("AtlasTexture_xj7wv") |
| 90 | +}, { |
| 91 | +"duration": 1.0, |
| 92 | +"texture": SubResource("AtlasTexture_gm8by") |
| 93 | +}, { |
| 94 | +"duration": 1.0, |
| 95 | +"texture": SubResource("AtlasTexture_6n2fs") |
| 96 | +}, { |
| 97 | +"duration": 1.0, |
| 98 | +"texture": SubResource("AtlasTexture_mm1e4") |
| 99 | +}], |
| 100 | +"loop": true, |
| 101 | +"name": &"idle", |
| 102 | +"speed": 10.0 |
| 103 | +}, { |
| 104 | +"frames": [{ |
| 105 | +"duration": 1.0, |
| 106 | +"texture": SubResource("AtlasTexture_3ik0p") |
| 107 | +}, { |
| 108 | +"duration": 1.0, |
| 109 | +"texture": SubResource("AtlasTexture_g164v") |
| 110 | +}, { |
| 111 | +"duration": 1.0, |
| 112 | +"texture": SubResource("AtlasTexture_7h4s2") |
| 113 | +}, { |
| 114 | +"duration": 1.0, |
| 115 | +"texture": SubResource("AtlasTexture_5eihk") |
| 116 | +}, { |
| 117 | +"duration": 1.0, |
| 118 | +"texture": SubResource("AtlasTexture_6f568") |
| 119 | +}, { |
| 120 | +"duration": 1.0, |
| 121 | +"texture": SubResource("AtlasTexture_nplwa") |
| 122 | +}], |
| 123 | +"loop": true, |
| 124 | +"name": &"walk", |
| 125 | +"speed": 10.0 |
| 126 | +}] |
| 127 | + |
| 128 | +[sub_resource type="CircleShape2D" id="CircleShape2D_byhft"] |
| 129 | +radius = 19.0 |
| 130 | + |
| 131 | +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_fq8fe"] |
| 132 | +radius = 8.0 |
| 133 | +height = 34.0 |
| 134 | + |
| 135 | +[node name="Sheep" type="CharacterBody2D"] |
| 136 | +script = ExtResource("1_qs77e") |
| 137 | + |
| 138 | +[node name="Sprite" type="AnimatedSprite2D" parent="."] |
| 139 | +sprite_frames = SubResource("SpriteFrames_uweta") |
| 140 | +animation = &"walk" |
| 141 | + |
| 142 | +[node name="HitboxComponent" parent="." node_paths=PackedStringArray("health_component") instance=ExtResource("2_oxvx7")] |
| 143 | +health_component = NodePath("../HealthComponent") |
| 144 | + |
| 145 | +[node name="CollisionShape2D" type="CollisionShape2D" parent="HitboxComponent"] |
| 146 | +shape = SubResource("CircleShape2D_byhft") |
| 147 | + |
| 148 | +[node name="KnockbackComponent" parent="." node_paths=PackedStringArray("hitbox", "body") instance=ExtResource("5_qflnu")] |
| 149 | +hitbox = NodePath("../HitboxComponent") |
| 150 | +body = NodePath("..") |
| 151 | + |
| 152 | +[node name="HealthComponent" type="Node2D" parent="."] |
| 153 | +script = ExtResource("2_ycipw") |
| 154 | +MAX_HEALTH = 5 |
| 155 | + |
| 156 | +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] |
| 157 | +position = Vector2(0, 8) |
| 158 | +rotation = 1.5708 |
| 159 | +shape = SubResource("CapsuleShape2D_fq8fe") |
| 160 | + |
| 161 | +[node name="HealthBar" parent="." node_paths=PackedStringArray("health_component") instance=ExtResource("4_krxru")] |
| 162 | +offset_left = -22.0 |
| 163 | +offset_top = -26.0 |
| 164 | +offset_right = 28.0 |
| 165 | +offset_bottom = -20.0 |
| 166 | +health_component = NodePath("../HealthComponent") |
| 167 | + |
| 168 | +[node name="HitAnimation" parent="." instance=ExtResource("6_tfhpn")] |
| 169 | + |
| 170 | +[node name="DropItems" type="Node2D" parent="."] |
| 171 | +script = ExtResource("7_3b5mt") |
| 172 | +MIN_DROP = 1 |
| 173 | +MAX_DROP = 4 |
| 174 | +item = ExtResource("8_pxsnm") |
| 175 | + |
| 176 | +[node name="StateMachine" type="Node2D" parent="." node_paths=PackedStringArray("initial_state")] |
| 177 | +script = ExtResource("9_ya02d") |
| 178 | +initial_state = NodePath("Idle") |
| 179 | + |
| 180 | +[node name="Idle" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("character")] |
| 181 | +script = ExtResource("10_liamn") |
| 182 | +character = NodePath("../..") |
| 183 | + |
| 184 | +[node name="Escape" type="Node2D" parent="StateMachine" node_paths=PackedStringArray("character")] |
| 185 | +script = ExtResource("12_rqfsc") |
| 186 | +character = NodePath("../..") |
0 commit comments