Cleanup waypoints test project

This commit is contained in:
Serhii Snitsaruk 2022-12-16 04:16:19 +01:00
parent c574334f6e
commit 5de3bf344e
4 changed files with 10 additions and 12 deletions

View File

@ -2,7 +2,7 @@
extends BTAction extends BTAction
@export var animation_name: String @export var animation_name: String
@export var player_path: NodePath @export var animation_player: NodePath
var _player: AnimationPlayer var _player: AnimationPlayer
var _finished: bool var _finished: bool
@ -13,7 +13,7 @@ func _generate_name() -> String:
func _setup() -> void: func _setup() -> void:
_player = agent.get_node(player_path) _player = agent.get_node(animation_player)
func _enter() -> void: func _enter() -> void:

View File

@ -2,7 +2,7 @@
extends BTAction extends BTAction
@export var animation_name: String @export var animation_name: String
@export var player_path: NodePath @export var animation_player: NodePath
var _player: AnimationPlayer var _player: AnimationPlayer
@ -12,7 +12,7 @@ func _generate_name() -> String:
func _setup() -> void: func _setup() -> void:
_player = agent.get_node(player_path) _player = agent.get_node(animation_player)
func _tick(p_delta: float) -> int: func _tick(p_delta: float) -> int:

View File

@ -12,7 +12,7 @@ tolerance = 50.0
[sub_resource type="BTAction" id="BTAction_yq1vl"] [sub_resource type="BTAction" id="BTAction_yq1vl"]
script = ExtResource("2_hcuvn") script = ExtResource("2_hcuvn")
animation_name = "bounce" animation_name = "bounce"
player_path = NodePath("AnimationPlayer") animation_player = NodePath("AnimationPlayer")
[sub_resource type="BTSequence" id="BTSequence_a2ng0"] [sub_resource type="BTSequence" id="BTSequence_a2ng0"]
children = [SubResource("BTAction_3xal7"), SubResource("BTAction_yq1vl")] children = [SubResource("BTAction_3xal7"), SubResource("BTAction_yq1vl")]

View File

@ -10,23 +10,21 @@ script = ExtResource("1_kmjjq")
[node name="Waypoints" type="Node2D" parent="."] [node name="Waypoints" type="Node2D" parent="."]
[node name="WP1" type="Marker2D" parent="Waypoints"] [node name="WP1" type="Marker2D" parent="Waypoints"]
position = Vector2(283, 184) position = Vector2(258, 126)
script = ExtResource("3_1aub7") script = ExtResource("3_1aub7")
[node name="WP2" type="Marker2D" parent="Waypoints"] [node name="WP2" type="Marker2D" parent="Waypoints"]
position = Vector2(938, 100) position = Vector2(830, 131)
script = ExtResource("3_1aub7") script = ExtResource("3_1aub7")
[node name="WP3" type="Marker2D" parent="Waypoints"] [node name="WP3" type="Marker2D" parent="Waypoints"]
position = Vector2(838, 490) position = Vector2(534, 492)
script = ExtResource("3_1aub7")
[node name="WP4" type="Marker2D" parent="Waypoints"]
position = Vector2(177, 515)
script = ExtResource("3_1aub7") script = ExtResource("3_1aub7")
[node name="Agent" parent="." instance=ExtResource("1_esee5")] [node name="Agent" parent="." instance=ExtResource("1_esee5")]
y_sort_enabled = true
position = Vector2(57, 59) position = Vector2(57, 59)
[node name="Agent2" parent="." instance=ExtResource("1_esee5")] [node name="Agent2" parent="." instance=ExtResource("1_esee5")]
y_sort_enabled = true
position = Vector2(316, 590) position = Vector2(316, 590)