attack_planner.tscn 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. [gd_scene load_steps=7 format=3 uid="uid://bfieuhe2in16j"]
  2. [ext_resource type="Script" uid="uid://6m4qtogvr57" path="res://TankWars/TacticalDeciders/attack_planner.gd" id="1_klhpx"]
  3. [ext_resource type="Script" uid="uid://cau6j0o0julfq" path="res://addons/godot_state_charts/state_chart.gd" id="3_n54wo"]
  4. [ext_resource type="Script" uid="uid://bou0yn8lpwcuh" path="res://addons/godot_state_charts/compound_state.gd" id="4_watj6"]
  5. [ext_resource type="Script" uid="uid://dyiggrr357tov" path="res://addons/godot_state_charts/atomic_state.gd" id="5_dyfgg"]
  6. [ext_resource type="Script" uid="uid://m8bym6l05tkl" path="res://addons/godot_state_charts/transition.gd" id="6_k4lu7"]
  7. [ext_resource type="Script" uid="uid://dtlmgewt76wtf" path="res://addons/godot_state_charts/parallel_state.gd" id="7_228ao"]
  8. [node name="AttackPlanner" type="Node2D"]
  9. script = ExtResource("1_klhpx")
  10. [node name="Behavior" type="Node" parent="."]
  11. script = ExtResource("3_n54wo")
  12. metadata/_custom_type_script = "uid://cau6j0o0julfq"
  13. [node name="CompoundState" type="Node" parent="Behavior"]
  14. script = ExtResource("4_watj6")
  15. initial_state = NodePath("Idle")
  16. metadata/_custom_type_script = "uid://bou0yn8lpwcuh"
  17. [node name="Idle" type="Node" parent="Behavior/CompoundState"]
  18. script = ExtResource("5_dyfgg")
  19. metadata/_custom_type_script = "uid://dyiggrr357tov"
  20. [node name="attack" type="Node" parent="Behavior/CompoundState/Idle"]
  21. script = ExtResource("6_k4lu7")
  22. to = NodePath("../../MovementAndShooting")
  23. event = &"attack"
  24. delay_in_seconds = "0.0"
  25. [node name="MovementAndShooting" type="Node" parent="Behavior/CompoundState"]
  26. script = ExtResource("7_228ao")
  27. metadata/_custom_type_script = "uid://dtlmgewt76wtf"
  28. [node name="FollowEnemy" type="Node" parent="Behavior/CompoundState/MovementAndShooting"]
  29. script = ExtResource("5_dyfgg")
  30. metadata/_custom_type_script = "uid://dyiggrr357tov"
  31. [node name="Shooting" type="Node" parent="Behavior/CompoundState/MovementAndShooting"]
  32. script = ExtResource("4_watj6")
  33. initial_state = NodePath("Ready")
  34. metadata/_custom_type_script = "uid://bou0yn8lpwcuh"
  35. [node name="Ready" type="Node" parent="Behavior/CompoundState/MovementAndShooting/Shooting"]
  36. script = ExtResource("5_dyfgg")
  37. metadata/_custom_type_script = "uid://dyiggrr357tov"
  38. [node name="shoot" type="Node" parent="Behavior/CompoundState/MovementAndShooting/Shooting/Ready"]
  39. script = ExtResource("6_k4lu7")
  40. to = NodePath("../../Shooting")
  41. event = &"ready_to_shoot"
  42. delay_in_seconds = "0.0"
  43. [node name="Shooting" type="Node" parent="Behavior/CompoundState/MovementAndShooting/Shooting"]
  44. script = ExtResource("5_dyfgg")
  45. metadata/_custom_type_script = "uid://dyiggrr357tov"
  46. [node name="reloaded" type="Node" parent="Behavior/CompoundState/MovementAndShooting/Shooting/Shooting"]
  47. script = ExtResource("6_k4lu7")
  48. to = NodePath("../../Ready")
  49. delay_in_seconds = "reload_time"
  50. [node name="stop" type="Node" parent="Behavior/CompoundState/MovementAndShooting"]
  51. script = ExtResource("6_k4lu7")
  52. to = NodePath("../../Idle")
  53. event = &"stop"
  54. delay_in_seconds = "0.0"
  55. [connection signal="taken" from="Behavior/CompoundState/Idle/attack" to="." method="_on_attack_taken"]
  56. [connection signal="state_processing" from="Behavior/CompoundState/MovementAndShooting/FollowEnemy" to="." method="_on_follow_enemy_state_processing"]
  57. [connection signal="taken" from="Behavior/CompoundState/MovementAndShooting/Shooting/Ready/shoot" to="." method="_on_shoot_taken"]