alai/godot/goal/Goal.tscn

51 lines
1.5 KiB
Plaintext

[gd_scene load_steps=10 format=2]
[ext_resource path="res://assets/flag.png" type="Texture" id=1]
[ext_resource path="res://goal/GoalNotReached.gdns" type="Script" id=2]
[ext_resource path="res://goal/GoalReached.gdns" type="Script" id=3]
[ext_resource path="res://state_machine/StateMachine.gdns" type="Script" id=4]
[ext_resource path="res://goal/Goal.gd" type="Script" id=5]
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 10, 18 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 18, 36 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 1 )
region = Rect2( 18, 0, 18, 36 )
[sub_resource type="SpriteFrames" id=8]
animations = [ {
"frames": [ SubResource( 6 ), SubResource( 7 ) ],
"loop": true,
"name": "flagmove",
"speed": 5.0
} ]
[node name="Goal" type="Area2D"]
collision_layer = 32
script = ExtResource( 5 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 5 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 8 )
animation = "flagmove"
playing = true
[node name="StateMachine" type="Node" parent="."]
script = ExtResource( 4 )
default_state = "GoalNotReached"
[node name="GoalReached" type="Node" parent="StateMachine"]
script = ExtResource( 3 )
[node name="GoalNotReached" type="Node" parent="StateMachine"]
script = ExtResource( 2 )
[connection signal="body_entered" from="." to="StateMachine/GoalNotReached" method="_on_Goal_body_entered"]