Add ProbabilitySelector usage test to demo project
This commit is contained in:
parent
1df821fdfa
commit
d0e9bb0ed3
|
@ -0,0 +1,27 @@
|
|||
[gd_resource type="BehaviorTree" load_steps=8 format=3 uid="uid://cen725hsk8lyl"]
|
||||
|
||||
[sub_resource type="BTComment" id="BTComment_84hry"]
|
||||
custom_name = "This is a test of ProbabilitySelector choosing action to execute"
|
||||
|
||||
[sub_resource type="BTConsolePrint" id="BTConsolePrint_3d5qm"]
|
||||
text = "Rare action"
|
||||
|
||||
[sub_resource type="BTConsolePrint" id="BTConsolePrint_s6p66"]
|
||||
text = "Uncommon action"
|
||||
metadata/_weight_ = 4.0
|
||||
|
||||
[sub_resource type="BTConsolePrint" id="BTConsolePrint_2f8re"]
|
||||
text = "Common action"
|
||||
metadata/_weight_ = 12.0
|
||||
|
||||
[sub_resource type="BTProbabilitySelector" id="BTProbabilitySelector_hy6es"]
|
||||
children = [SubResource("BTConsolePrint_3d5qm"), SubResource("BTConsolePrint_s6p66"), SubResource("BTConsolePrint_2f8re")]
|
||||
|
||||
[sub_resource type="BTDelay" id="BTDelay_mxnxy"]
|
||||
children = [SubResource("BTProbabilitySelector_hy6es")]
|
||||
|
||||
[sub_resource type="BTSequence" id="BTSequence_auek2"]
|
||||
children = [SubResource("BTComment_84hry"), SubResource("BTDelay_mxnxy")]
|
||||
|
||||
[resource]
|
||||
root_task = SubResource("BTSequence_auek2")
|
|
@ -0,0 +1,8 @@
|
|||
[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"]
|
||||
|
||||
[node name="test_probability_selector" type="Node2D"]
|
||||
|
||||
[node name="BTPlayer" type="BTPlayer" parent="."]
|
||||
behavior_tree = ExtResource("1_lr7l2")
|
Loading…
Reference in New Issue