Restructure demo project for better compatibility with AssetLib package
Also, add warning ignores for the custom task.
This commit is contained in:
parent
9bfa0268c1
commit
12dbd9e1a6
|
@ -1,7 +0,0 @@
|
||||||
[gd_resource type="Environment" load_steps=2 format=2]
|
|
||||||
|
|
||||||
[sub_resource type="Sky" id=1]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
background_mode = 2
|
|
||||||
background_sky = SubResource( 1 )
|
|
|
@ -18,12 +18,14 @@ extends BTAction
|
||||||
@export var tolerance := 50.0
|
@export var tolerance := 50.0
|
||||||
|
|
||||||
|
|
||||||
|
@warning_ignore("native_method_override") # needed for GDExtension version.
|
||||||
func _generate_name() -> String:
|
func _generate_name() -> String:
|
||||||
return "Arrive pos: %s speed: %s" % [
|
return "Arrive pos: %s speed: %s" % [
|
||||||
LimboUtility.decorate_var(target_position_var),
|
LimboUtility.decorate_var(target_position_var),
|
||||||
LimboUtility.decorate_var(speed_var),
|
LimboUtility.decorate_var(speed_var),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@warning_ignore("native_method_override")
|
||||||
func _tick(p_delta: float) -> Status:
|
func _tick(p_delta: float) -> Status:
|
||||||
var target_pos: Vector2 = blackboard.get_var(target_position_var, Vector2.ZERO)
|
var target_pos: Vector2 = blackboard.get_var(target_position_var, Vector2.ZERO)
|
||||||
if target_pos.distance_to(agent.global_position) < tolerance:
|
if target_pos.distance_to(agent.global_position) < tolerance:
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_resource type="BehaviorTree" load_steps=10 format=3 uid="uid://cjkqi41oagagd"]
|
[gd_resource type="BehaviorTree" load_steps=10 format=3 uid="uid://cjkqi41oagagd"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://ai/tasks/arrive_pos.gd" id="1_rhs33"]
|
[ext_resource type="Script" path="res://demo/ai/tasks/arrive_pos.gd" id="1_rhs33"]
|
||||||
|
|
||||||
[sub_resource type="BTAction" id="BTAction_3xal7"]
|
[sub_resource type="BTAction" id="BTAction_3xal7"]
|
||||||
script = ExtResource("1_rhs33")
|
script = ExtResource("1_rhs33")
|
|
@ -1,8 +1,8 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://d4bjeyescflm8"]
|
[gd_scene load_steps=2 format=3 uid="uid://d4bjeyescflm8"]
|
||||||
|
|
||||||
[ext_resource type="BehaviorTree" uid="uid://cvm3gqes75f53" path="res://ai/trees/variables.tres" id="1_tq7fc"]
|
[ext_resource type="BehaviorTree" uid="uid://cvm3gqes75f53" path="res://demo/ai/trees/variables.tres" id="1_cm2sf"]
|
||||||
|
|
||||||
[node name="Variables Example" type="Node2D"]
|
[node name="Variables Example" type="Node2D"]
|
||||||
|
|
||||||
[node name="BTPlayer" type="BTPlayer" parent="."]
|
[node name="BTPlayer" type="BTPlayer" parent="."]
|
||||||
behavior_tree = ExtResource("1_tq7fc")
|
behavior_tree = ExtResource("1_cm2sf")
|
|
@ -1,8 +1,8 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://p5i7fdku3hqs"]
|
[gd_scene load_steps=4 format=3 uid="uid://p5i7fdku3hqs"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://examples/waypoints/example_waypoints.gd" id="1_d4sso"]
|
[ext_resource type="Script" path="res://demo/examples/waypoints/example_waypoints.gd" id="1_d4sso"]
|
||||||
[ext_resource type="Script" path="res://examples/waypoints/waypoint_marker.gd" id="2_l26sl"]
|
[ext_resource type="Script" path="res://demo/examples/waypoints/waypoint_marker.gd" id="2_l26sl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c26b8c8dndtop" path="res://examples/waypoints/patrolling_agent.tscn" id="3_t4qgi"]
|
[ext_resource type="PackedScene" uid="uid://c26b8c8dndtop" path="res://demo/examples/waypoints/patrolling_agent.tscn" id="3_t4qgi"]
|
||||||
|
|
||||||
[node name="ExampleWaypoints" type="Node2D"]
|
[node name="ExampleWaypoints" type="Node2D"]
|
||||||
script = ExtResource("1_d4sso")
|
script = ExtResource("1_d4sso")
|
|
@ -1,8 +1,8 @@
|
||||||
[gd_scene load_steps=7 format=3 uid="uid://c26b8c8dndtop"]
|
[gd_scene load_steps=7 format=3 uid="uid://c26b8c8dndtop"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://examples/waypoints/patrolling_agent.gd" id="1_5wwhb"]
|
[ext_resource type="Script" path="res://demo/examples/waypoints/patrolling_agent.gd" id="1_5wwhb"]
|
||||||
[ext_resource type="BehaviorTree" uid="uid://cjkqi41oagagd" path="res://ai/trees/waypoints.tres" id="2_66y4v"]
|
[ext_resource type="BehaviorTree" uid="uid://cjkqi41oagagd" path="res://demo/ai/trees/waypoints.tres" id="2_66y4v"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d0mht3ntak7e5" path="res://icon.png" id="3_j5bxx"]
|
[ext_resource type="Texture2D" uid="uid://d0mht3ntak7e5" path="res://demo/godot.png" id="3_64ge2"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_5id00"]
|
[sub_resource type="Animation" id="Animation_5id00"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
|
@ -51,7 +51,7 @@ _blackboard_data = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
texture = ExtResource("3_j5bxx")
|
texture = ExtResource("3_64ge2")
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
libraries = {
|
libraries = {
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -3,15 +3,15 @@
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://d0mht3ntak7e5"
|
uid="uid://d0mht3ntak7e5"
|
||||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
|
path="res://.godot/imported/godot.png-a8a26b1338954efbba9baa82b9ad4a96.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://icon.png"
|
source_file="res://demo/godot.png"
|
||||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
|
dest_files=["res://.godot/imported/godot.png-a8a26b1338954efbba9baa82b9ad4a96.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://c3d3ed6545cly"]
|
[gd_scene load_steps=3 format=3 uid="uid://c3d3ed6545cly"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://tests/agent_properties/agent_properties.gd" id="1_jh88u"]
|
[ext_resource type="Script" path="res://demo/tests/agent_properties/agent_properties.gd" id="1_jh88u"]
|
||||||
[ext_resource type="BehaviorTree" uid="uid://ddhxf0haxgw" path="res://tests/agent_properties/bt_agent_properties.tres" id="2_txe8k"]
|
[ext_resource type="BehaviorTree" uid="uid://ddhxf0haxgw" path="res://demo/tests/agent_properties/bt_agent_properties.tres" id="2_txe8k"]
|
||||||
|
|
||||||
[node name="AgentProperties" type="Node2D"]
|
[node name="AgentProperties" type="Node2D"]
|
||||||
script = ExtResource("1_jh88u")
|
script = ExtResource("1_jh88u")
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://dgeb7tg8xb3j4"]
|
[gd_scene load_steps=2 format=3 uid="uid://dgeb7tg8xb3j4"]
|
||||||
|
|
||||||
[ext_resource type="BehaviorTree" uid="uid://cen725hsk8lyl" path="res://tests/probability_selector/bt_test_probability_selector.tres" id="1_lr7l2"]
|
[ext_resource type="BehaviorTree" uid="uid://cen725hsk8lyl" path="res://demo/tests/probability_selector/bt_test_probability_selector.tres" id="1_lr7l2"]
|
||||||
|
|
||||||
[node name="test_probability_selector" type="Node2D"]
|
[node name="test_probability_selector" type="Node2D"]
|
||||||
|
|
|
@ -12,9 +12,9 @@ config_version=5
|
||||||
|
|
||||||
config/name="LimboAI Test"
|
config/name="LimboAI Test"
|
||||||
config/tags=PackedStringArray("demo")
|
config/tags=PackedStringArray("demo")
|
||||||
run/main_scene="res://examples/waypoints/example_waypoints.tscn"
|
run/main_scene="res://demo/examples/waypoints/example_waypoints.tscn"
|
||||||
config/features=PackedStringArray("4.2")
|
config/features=PackedStringArray("4.2")
|
||||||
config/icon="res://icon.png"
|
config/icon="res://demo/godot.png"
|
||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
|
|
||||||
|
@ -24,6 +24,11 @@ gdscript/warnings/native_method_override=1
|
||||||
|
|
||||||
common/drop_mouse_on_gui_input_disabled=true
|
common/drop_mouse_on_gui_input_disabled=true
|
||||||
|
|
||||||
|
[limbo_ai]
|
||||||
|
|
||||||
|
behavior_tree/behavior_tree_default_dir="res://demo/ai/trees"
|
||||||
|
behavior_tree/user_task_dir_1="res://demo/ai/tasks"
|
||||||
|
|
||||||
[physics]
|
[physics]
|
||||||
|
|
||||||
common/enable_pause_aware_picking=true
|
common/enable_pause_aware_picking=true
|
||||||
|
|
Loading…
Reference in New Issue