FishGame/Actors/Fish.tscn
2022-01-20 23:33:07 -05:00

81 lines
2.2 KiB
Plaintext

[gd_scene load_steps=7 format=2]
[ext_resource path="res://Actors/Fish.gd" type="Script" id=1]
[ext_resource path="res://fish.png" type="Texture" id=2]
[ext_resource path="res://fish2.png" type="Texture" id=3]
[sub_resource type="CapsuleShape2D" id=1]
radius = 25.4989
height = 59.0012
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 253, 195 )
[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ ExtResource( 3 ) ],
"loop": true,
"name": "left",
"speed": 5.0
}, {
"frames": [ ExtResource( 2 ) ],
"loop": true,
"name": "right",
"speed": 5.0
} ]
[node name="Fish" type="KinematicBody2D" groups=["Fish"]]
position = Vector2( 56.4995, 307.501 )
script = ExtResource( 1 )
__meta__ = {
"_edit_group_": true
}
swim_speed = 90.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( -1, 0 )
rotation = 1.5708
shape = SubResource( 1 )
[node name="Vision" type="Area2D" parent="."]
[node name="VisionRadius" type="CollisionShape2D" parent="Vision"]
shape = SubResource( 2 )
[node name="SwimTimer" type="Timer" parent="."]
autostart = true
[node name="DropTimer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
autostart = true
[node name="HungerTimer" type="Timer" parent="."]
wait_time = 10.0
autostart = true
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 3 )
animation = "left"
[node name="FishHitbox" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="FishHitbox"]
position = Vector2( -1, 0 )
rotation = 1.5708
shape = SubResource( 1 )
[node name="Line2D" type="Line2D" parent="."]
points = PoolVector2Array( 0, 0, 0, 0 )
[node name="Timer2" type="Timer" parent="."]
wait_time = 60.0
one_shot = true
autostart = true
[connection signal="body_entered" from="Vision" to="." method="_on_Vision_body_entered"]
[connection signal="timeout" from="SwimTimer" to="." method="_on_SwimTimer_timeout"]
[connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"]
[connection signal="timeout" from="HungerTimer" to="." method="_on_HungerTimer_timeout"]
[connection signal="body_entered" from="FishHitbox" to="." method="_on_FishHitbox_body_entered"]