86 lines
3.3 KiB
Plaintext
86 lines
3.3 KiB
Plaintext
[gd_scene format=3 uid="uid://s4s66oaexava"]
|
|
|
|
[ext_resource type="Script" uid="uid://d07cjelbqbiug" path="res://molecular/predator/hammerhead_predator.gd" id="1_xp037"]
|
|
[ext_resource type="Texture2D" uid="uid://ch5rddsumyyhm" path="res://molecular/assets/predator/predator-healthy.png" id="2_34kwa"]
|
|
[ext_resource type="Script" uid="uid://cygrmt03sx0k1" path="res://molecular/predator/state_machine.gd" id="3_xp037"]
|
|
[ext_resource type="Script" uid="uid://xbiqj7ubmj7d" path="res://molecular/prey/state_idle.gd" id="4_8a23j"]
|
|
[ext_resource type="Script" uid="uid://ubcu8fdfxxj1" path="res://molecular/prey/state_random_movement.gd" id="5_6rsu5"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_8a23j"]
|
|
atlas = ExtResource("2_34kwa")
|
|
region = Rect2(0, 0, 64, 64)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6rsu5"]
|
|
atlas = ExtResource("2_34kwa")
|
|
region = Rect2(64, 0, 64, 64)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_0ts4d"]
|
|
atlas = ExtResource("2_34kwa")
|
|
region = Rect2(128, 0, 64, 64)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_shhro"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 3.0,
|
|
"texture": SubResource("AtlasTexture_8a23j")
|
|
}, {
|
|
"duration": 2.0,
|
|
"texture": SubResource("AtlasTexture_6rsu5")
|
|
}, {
|
|
"duration": 4.0,
|
|
"texture": SubResource("AtlasTexture_0ts4d")
|
|
}],
|
|
"loop": true,
|
|
"name": &"Healthy",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[node name="HammerheadPredator" type="CharacterBody2D" unique_id=678504815 groups=["predator"]]
|
|
scale = Vector2(0.3, 0.3)
|
|
collision_layer = 4
|
|
collision_mask = 3
|
|
motion_mode = 1
|
|
script = ExtResource("1_xp037")
|
|
maxHealth = 50
|
|
metadata/_custom_type_script = "uid://dgfimmq53whll"
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=410999609]
|
|
sprite_frames = SubResource("SpriteFrames_shhro")
|
|
animation = &"Healthy"
|
|
|
|
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="." unique_id=1596156928]
|
|
light_mask = 4
|
|
visibility_layer = 4
|
|
position = Vector2(0.11167908, 1.1167793)
|
|
polygon = PackedVector2Array(-22.184862, -27.994831, 23.481365, -27.21198, 13.82622, 25.891317, -6.005971, 25.891317)
|
|
|
|
[node name="StateMachine" type="Node" parent="." unique_id=1857729810 node_paths=PackedStringArray("initial_state")]
|
|
script = ExtResource("3_xp037")
|
|
initial_state = NodePath("Idle")
|
|
metadata/_custom_type_script = "uid://ck7k8ht54snsy"
|
|
|
|
[node name="Idle" type="Node" parent="StateMachine" unique_id=265876039]
|
|
script = ExtResource("4_8a23j")
|
|
metadata/_custom_type_script = "uid://co2xp7gauamql"
|
|
|
|
[node name="Timer" type="Timer" parent="StateMachine/Idle" unique_id=1870665609]
|
|
one_shot = true
|
|
|
|
[node name="RandomMovement" type="Node" parent="StateMachine" unique_id=105315122]
|
|
script = ExtResource("5_6rsu5")
|
|
metadata/_custom_type_script = "uid://co2xp7gauamql"
|
|
|
|
[node name="Timer" type="Timer" parent="StateMachine/RandomMovement" unique_id=447822526]
|
|
one_shot = true
|
|
|
|
[node name="Sight" type="Area2D" parent="." unique_id=1608385873]
|
|
collision_layer = 0
|
|
collision_mask = 7
|
|
|
|
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Sight" unique_id=1707240701]
|
|
light_mask = 4
|
|
visibility_layer = 4
|
|
polygon = PackedVector2Array(-27.769547, -29.426758, 31.88504, -29.184647, 12.700996, 28.7294, 56.058624, 148.93633, 22.979004, 163.77974, -19.854843, 161.65926, -53.782654, 143.84715, -8.333115, 30.157196)
|
|
|
|
[connection signal="body_entered" from="Sight" to="." method="_on_sight_body_entered"]
|