File tree Expand file tree Collapse file tree 7 files changed +10
-24
lines changed Expand file tree Collapse file tree 7 files changed +10
-24
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public void End () {
3131 Child . End ( ) ;
3232 }
3333
34- public void Reset ( bool hardReset = false ) {
34+ public void Reset ( ) {
3535 }
3636
3737 public ITaskParent AddChild ( ITask child ) {
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ public override void End () {
88 }
99 }
1010
11- public override void Reset ( bool hardReset = false ) {
11+ public override void Reset ( ) {
1212 ChildIndex = 0 ;
1313
14- base . Reset ( hardReset ) ;
14+ base . Reset ( ) ;
1515 }
1616 }
1717}
Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ protected override TaskStatus OnUpdate () {
4242 return TaskStatus . Continue ;
4343 }
4444
45- public override void Reset ( bool hardReset = false ) {
45+ public override void Reset ( ) {
4646 _childStatus . Clear ( ) ;
4747
48- base . Reset ( hardReset ) ;
48+ base . Reset ( ) ;
4949 }
5050
5151 public override void End ( ) {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ protected virtual TaskStatus OnUpdate () {
4848 return TaskStatus . Success ;
4949 }
5050
51- public virtual void Reset ( bool hardReset = false ) {
51+ public virtual void Reset ( ) {
5252 }
5353
5454 public virtual ITaskParent AddChild ( ITask child ) {
Original file line number Diff line number Diff line change @@ -41,10 +41,9 @@ public interface ITask {
4141 void End ( ) ;
4242
4343 /// <summary>
44- /// Reset this task back to its initial state. Hard reset should run all
45- /// one time run only logic (meant for pooling)
44+ /// Reset this task back to its initial state to run again. Triggered after the behavior
45+ /// tree finishes with a task status other than continue.
4646 /// </summary>
47- /// <param name="hardReset"></param>
48- void Reset ( bool hardReset = false ) ;
47+ void Reset ( ) ;
4948 }
5049}
Original file line number Diff line number Diff line change @@ -55,14 +55,9 @@ private void UpdateTicks () {
5555 /// <summary>
5656 /// Reset the node to be re-used
5757 /// </summary>
58- /// <param name="hardReset">Used to wipe the node back to its original state. Meant for pooling.</param>
59- public void Reset ( bool hardReset = false ) {
58+ public void Reset ( ) {
6059 _start = false ;
6160 _exit = false ;
62-
63- if ( hardReset ) {
64- _init = false ;
65- }
6661 }
6762
6863 public void End ( ) {
Original file line number Diff line number Diff line change @@ -128,14 +128,6 @@ public void Does_not_trigger_on_reset () {
128128
129129 Assert . AreEqual ( 1 , node . InitCount ) ;
130130 }
131-
132- [ Test ]
133- public void Triggers_on_reset_hard ( ) {
134- node . Reset ( true ) ;
135- node . Update ( ) ;
136-
137- Assert . AreEqual ( 2 , node . InitCount ) ;
138- }
139131 }
140132
141133 public class ExitEvent : UpdateMethod {
You can’t perform that action at this time.
0 commit comments