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 () {
31
31
Child . End ( ) ;
32
32
}
33
33
34
- public void Reset ( bool hardReset = false ) {
34
+ public void Reset ( ) {
35
35
}
36
36
37
37
public ITaskParent AddChild ( ITask child ) {
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ public override void End () {
8
8
}
9
9
}
10
10
11
- public override void Reset ( bool hardReset = false ) {
11
+ public override void Reset ( ) {
12
12
ChildIndex = 0 ;
13
13
14
- base . Reset ( hardReset ) ;
14
+ base . Reset ( ) ;
15
15
}
16
16
}
17
17
}
Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ protected override TaskStatus OnUpdate () {
42
42
return TaskStatus . Continue ;
43
43
}
44
44
45
- public override void Reset ( bool hardReset = false ) {
45
+ public override void Reset ( ) {
46
46
_childStatus . Clear ( ) ;
47
47
48
- base . Reset ( hardReset ) ;
48
+ base . Reset ( ) ;
49
49
}
50
50
51
51
public override void End ( ) {
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ protected virtual TaskStatus OnUpdate () {
48
48
return TaskStatus . Success ;
49
49
}
50
50
51
- public virtual void Reset ( bool hardReset = false ) {
51
+ public virtual void Reset ( ) {
52
52
}
53
53
54
54
public virtual ITaskParent AddChild ( ITask child ) {
Original file line number Diff line number Diff line change @@ -41,10 +41,9 @@ public interface ITask {
41
41
void End ( ) ;
42
42
43
43
/// <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.
46
46
/// </summary>
47
- /// <param name="hardReset"></param>
48
- void Reset ( bool hardReset = false ) ;
47
+ void Reset ( ) ;
49
48
}
50
49
}
Original file line number Diff line number Diff line change @@ -55,14 +55,9 @@ private void UpdateTicks () {
55
55
/// <summary>
56
56
/// Reset the node to be re-used
57
57
/// </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 ( ) {
60
59
_start = false ;
61
60
_exit = false ;
62
-
63
- if ( hardReset ) {
64
- _init = false ;
65
- }
66
61
}
67
62
68
63
public void End ( ) {
Original file line number Diff line number Diff line change @@ -128,14 +128,6 @@ public void Does_not_trigger_on_reset () {
128
128
129
129
Assert . AreEqual ( 1 , node . InitCount ) ;
130
130
}
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
- }
139
131
}
140
132
141
133
public class ExitEvent : UpdateMethod {
You can’t perform that action at this time.
0 commit comments