ft: wrapping manager overhaul
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
[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="Script" uid="uid://cus6ogtwxx4v7" path="res://molecular/predator/collision.gd" id="2_7qt2q"]
|
||||
[ext_resource type="Texture2D" uid="uid://ch5rddsumyyhm" path="res://molecular/assets/predator/predator-healthy.png" id="2_34kwa"]
|
||||
[ext_resource type="Texture2D" uid="uid://30uwkdbnuu3h" path="res://molecular/assets/predator/hammerheadRibozyme-hunting.png" id="3_0ts4d"]
|
||||
[ext_resource type="Script" uid="uid://cygrmt03sx0k1" path="res://molecular/predator/state_machine.gd" id="3_xp037"]
|
||||
@@ -91,31 +92,43 @@ animations = [{
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="HammerheadPredator" type="CharacterBody2D" unique_id=678504815 groups=["predator"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
motion_mode = 1
|
||||
[node name="HammerheadPredator" type="Node" unique_id=1312337720 groups=["predator"]]
|
||||
script = ExtResource("1_xp037")
|
||||
maxHealth = 50
|
||||
metadata/_custom_type_script = "uid://dgfimmq53whll"
|
||||
|
||||
[node name="WrappingManager" type="Node" parent="." unique_id=826586678 node_paths=PackedStringArray("sprite", "shape")]
|
||||
script = ExtResource("9_shhro")
|
||||
sprite = NodePath("../AnimatedSprite2D")
|
||||
shape = NodePath("../CollisionPolygon2D")
|
||||
metadata/_custom_type_script = "uid://bvbc0n0pslq7p"
|
||||
[node name="Collision" type="CharacterBody2D" parent="." unique_id=76553184]
|
||||
scale = Vector2(0.8, 0.8)
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
script = ExtResource("2_7qt2q")
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="." unique_id=1596156928]
|
||||
[node name="Sprite" type="AnimatedSprite2D" parent="Collision" unique_id=410999609]
|
||||
rotation = -1.5707964
|
||||
sprite_frames = SubResource("SpriteFrames_shhro")
|
||||
animation = &"Healthy"
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Collision" unique_id=1596156928]
|
||||
light_mask = 4
|
||||
visibility_layer = 4
|
||||
position = Vector2(0.111679085, 1.1167793)
|
||||
rotation = -1.5707964
|
||||
polygon = PackedVector2Array(-22.184862, -27.994831, 23.481365, -27.21198, 13.82622, 25.891317, -6.005971, 25.891317)
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=410999609]
|
||||
rotation = 4.712389
|
||||
sprite_frames = SubResource("SpriteFrames_shhro")
|
||||
animation = &"Hunting"
|
||||
[node name="Sight" type="Area2D" parent="Collision" unique_id=1608385873]
|
||||
collision_layer = 0
|
||||
collision_mask = 7
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Collision/Sight" unique_id=1707240701]
|
||||
light_mask = 4
|
||||
visibility_layer = 4
|
||||
position = Vector2(-1.0900421, 1.6350927)
|
||||
rotation = -1.5707964
|
||||
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)
|
||||
|
||||
[node name="WrappingManager" type="Node" parent="." unique_id=826586678]
|
||||
script = ExtResource("9_shhro")
|
||||
metadata/_custom_type_script = "uid://bvbc0n0pslq7p"
|
||||
|
||||
[node name="StateMachine" type="Node" parent="." unique_id=1857729810 node_paths=PackedStringArray("initial_state")]
|
||||
script = ExtResource("3_xp037")
|
||||
@@ -137,22 +150,11 @@ one_shot = true
|
||||
[node name="Hunting" type="Node" parent="StateMachine" unique_id=1569866955]
|
||||
script = ExtResource("8_7qt2q")
|
||||
|
||||
[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
|
||||
position = Vector2(-1.0900421, 1.6350927)
|
||||
rotation = -1.5707964
|
||||
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)
|
||||
|
||||
[node name="AttackCooldownTimer" type="Timer" parent="." unique_id=435253442]
|
||||
wait_time = 0.5
|
||||
one_shot = true
|
||||
|
||||
[connection signal="body_entered" from="Collision/Sight" to="." method="_on_sight_body_entered"]
|
||||
[connection signal="timeout" from="StateMachine/Idle/Timer" to="StateMachine/Idle" method="_on_timer_timeout"]
|
||||
[connection signal="timeout" from="StateMachine/RandomMovement/Timer" to="StateMachine/RandomMovement" method="_on_timer_timeout"]
|
||||
[connection signal="body_entered" from="Sight" to="." method="_on_sight_body_entered"]
|
||||
[connection signal="timeout" from="AttackCooldownTimer" to="." method="_on_attack_cooldown_timer_timeout"]
|
||||
|
||||
Reference in New Issue
Block a user