alai/godot/goal/Goal.tscn

52 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-08-01 14:10:00 -04:00
[gd_scene load_steps=9 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]
[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"]
position = Vector2( 324, 378 )
collision_layer = 32
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 18, 18 )
shape = SubResource( 5 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 18, 18 )
frames = SubResource( 8 )
animation = "flagmove"
playing = true
[node name="StateMachine" type="Node" parent="."]
script = ExtResource( 4 )
2022-08-01 15:05:09 -04:00
default_state = "GoalNotReached"
2022-08-01 14:10:00 -04:00
[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"]