Debugger refactoring and test project cleanup
This commit is contained in:
parent
a6a11f56d9
commit
0e2f4930e8
|
@ -28,17 +28,14 @@ private:
|
|||
TextureRect *info_icon;
|
||||
Label *info_message;
|
||||
|
||||
_FORCE_INLINE_ void _set_info_message(const String &p_message);
|
||||
void _set_info_message(const String &p_message);
|
||||
void _bt_selected(int p_idx);
|
||||
|
||||
protected:
|
||||
// void _notification(int p_notification);
|
||||
|
||||
public:
|
||||
void start_session();
|
||||
void stop_session();
|
||||
void update_bt_list(const Array &p_items);
|
||||
BehaviorTreeView *get_behavior_tree_view() { return bt_view; }
|
||||
BehaviorTreeView *get_behavior_tree_view() const { return bt_view; }
|
||||
|
||||
LimboDebuggerTab(Ref<EditorDebuggerSession> p_session);
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ func _tick(p_delta: float) -> int:
|
|||
var target_pos: Vector2 = blackboard.get_var(target_position_var, Vector2.ZERO)
|
||||
if target_pos.distance_to(agent.global_position) < tolerance:
|
||||
return SUCCESS
|
||||
|
||||
|
||||
var speed: float = blackboard.get_var(speed_var, 10.0)
|
||||
var dir: Vector2 = agent.global_position.direction_to(target_pos)
|
||||
agent.global_position += dir * speed * p_delta
|
||||
|
|
|
@ -9,7 +9,7 @@ var _finished: bool
|
|||
|
||||
|
||||
func _generate_name() -> String:
|
||||
return "PlayAnimation \"%s\"" % animation_name
|
||||
return "PlayAnimation \"%s\"" % animation_name
|
||||
|
||||
|
||||
func _setup() -> void:
|
||||
|
|
|
@ -8,7 +8,7 @@ var _player: AnimationPlayer
|
|||
|
||||
|
||||
func _generate_name() -> String:
|
||||
return "StartAnimation \"%s\"" % animation_name
|
||||
return "StartAnimation \"%s\"" % animation_name
|
||||
|
||||
|
||||
func _setup() -> void:
|
||||
|
|
|
@ -12,7 +12,7 @@ config_version=5
|
|||
|
||||
config/name="LimboAI Test"
|
||||
run/main_scene="res://tests/waypoints/test_waypoints.tscn"
|
||||
config/features=PackedStringArray("4.0")
|
||||
config/features=PackedStringArray("4.1")
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[gui]
|
||||
|
|
|
@ -46,7 +46,7 @@ script = ExtResource("1_1l3ql")
|
|||
[node name="BTPlayer" type="BTPlayer" parent="."]
|
||||
behavior_tree = ExtResource("2_ijwrx")
|
||||
_blackboard_data = {
|
||||
"speed": 500.0
|
||||
"speed": 200.0
|
||||
}
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
|
|
|
@ -6,10 +6,10 @@ extends Node2D
|
|||
|
||||
func _ready() -> void:
|
||||
var waypoints: Array[Node] = $Waypoints.get_children()
|
||||
|
||||
|
||||
for wp in waypoints:
|
||||
agent.add_waypoint(wp.global_position)
|
||||
|
||||
|
||||
waypoints.reverse()
|
||||
for wp in waypoints:
|
||||
agent_2.add_waypoint(wp.global_position)
|
||||
|
|
Loading…
Reference in New Issue