File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Assets/FluidBehaviorTree/Scripts/BehaviorTree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1- using Adnc . FluidBT . TaskParents . Composites ;
1+ using System . Collections . Generic ;
2+ using Adnc . FluidBT . TaskParents ;
3+ using Adnc . FluidBT . TaskParents . Composites ;
24using Adnc . FluidBT . Tasks ;
35using NSubstitute ;
46using NUnit . Framework ;
@@ -49,6 +51,15 @@ public void Set_the_child_nodes_GameObject_reference () {
4951 }
5052 }
5153
54+ public class ResetMethod : TreeTest {
55+ [ Test ]
56+ public void It_should_increase_the_tick_count ( ) {
57+ _tree . Reset ( ) ;
58+
59+ Assert . AreEqual ( 1 , _tree . TickCount ) ;
60+ }
61+ }
62+
5263 public class TickMethod : TreeTest {
5364 private ITask _action ;
5465
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ public Tree (GameObject owner) {
1616 Root . Owner = owner ;
1717 }
1818
19+ public void Reset ( ) {
20+ TickCount ++ ;
21+ }
22+
1923 public void AddNode ( ITaskParent parent , ITask child ) {
2024 parent . AddChild ( child ) ;
2125 child . ParentTree = this ;
You can’t perform that action at this time.
0 commit comments