Files
ferma/scenes/characters/cow/cow.tscn
2025-08-22 17:16:22 +05:00

84 lines
2.5 KiB
Plaintext

[gd_scene load_steps=12 format=3 uid="uid://dhrdm43clw6hx"]
[ext_resource type="Texture2D" uid="uid://c71ipew17qq4n" path="res://assets/game/Characters/cow_sprites.png" id="1_kc4rr"]
[ext_resource type="Script" uid="uid://c47padj61m0xm" path="res://scripts/state_machine/node_state_machine.gd" id="2_ilrem"]
[ext_resource type="Script" uid="uid://b0y0fxeo52kqi" path="res://scripts/state_machine/npc_states/idle_state.gd" id="3_j7g5r"]
[ext_resource type="Script" uid="uid://ciwbskg1hsree" path="res://scripts/state_machine/npc_states/walk_state.gd" id="4_4jynl"]
[sub_resource type="AtlasTexture" id="AtlasTexture_sa3qd"]
atlas = ExtResource("1_kc4rr")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_14ngq"]
atlas = ExtResource("1_kc4rr")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ilrem"]
atlas = ExtResource("1_kc4rr")
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_j7g5r"]
atlas = ExtResource("1_kc4rr")
region = Rect2(0, 32, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_4jynl"]
atlas = ExtResource("1_kc4rr")
region = Rect2(32, 32, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_cgos1"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_sa3qd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_14ngq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ilrem")
}],
"loop": true,
"name": &"idle",
"speed": 3.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_j7g5r")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4jynl")
}],
"loop": true,
"name": &"walk",
"speed": 3.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_kc4rr"]
radius = 7.0
[node name="Cow" type="CharacterBody2D"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -13)
sprite_frames = SubResource("SpriteFrames_cgos1")
animation = &"walk"
autoplay = "idle"
frame_progress = 0.754154
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -7)
shape = SubResource("CircleShape2D_kc4rr")
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
navigation_layers = 2
avoidance_enabled = true
[node name="StateMachine" type="Node" parent="."]
script = ExtResource("2_ilrem")
[node name="Idle" type="Node" parent="StateMachine"]
script = ExtResource("3_j7g5r")
[node name="Walk" type="Node" parent="StateMachine"]
script = ExtResource("4_4jynl")