Skip to content

Commit 451188e

Browse files
author
Evan Hu
committed
format code
1 parent 4af0a61 commit 451188e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+313
-384
lines changed

src/main/java/info/xiaomo/gengine/ai/btree/BehaviorTree.java

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* @author implicit-invocation
1313
* @author davebaol
14-
*
14+
* <p>
1515
* 2017年11月22日 下午2:43:23
1616
*/
1717
public class BehaviorTree<E> extends Task<E> {
@@ -156,9 +156,7 @@ public void step() {
156156
* 通知添加子任务
157157
*
158158
* @param task
159-
* @param index
160-
*
161-
* 2017年11月22日 下午4:00:00
159+
* @param index 2017年11月22日 下午4:00:00
162160
*/
163161
public void notifyChildAdded(Task<E> task, int index) {
164162
for (Listener<E> listener : listeners) {
@@ -170,9 +168,7 @@ public void notifyChildAdded(Task<E> task, int index) {
170168
* 通知任务更新
171169
*
172170
* @param task
173-
* @param previousStatus
174-
*
175-
* 2017年11月22日 下午5:04:00
171+
* @param previousStatus 2017年11月22日 下午5:04:00
176172
*/
177173
public void notifyStatusUpdated(Task<E> task, Status previousStatus) {
178174
for (Listener<E> listener : listeners) {
@@ -202,9 +198,7 @@ public void resetTask() {
202198
/**
203199
* 添加监听器
204200
*
205-
* @param listener
206-
*
207-
* 2017年11月22日 下午5:39:57
201+
* @param listener 2017年11月22日 下午5:39:57
208202
*/
209203
public void addListener(Listener<E> listener) {
210204
if (listeners == null) {
@@ -228,9 +222,7 @@ public void removeListeners() {
228222
/**
229223
* 行为树事件
230224
*
231-
* @param <E>
232-
*
233-
* 2017年11月22日 下午3:50:50
225+
* @param <E> 2017年11月22日 下午3:50:50
234226
*/
235227
public interface Listener<E> {
236228

@@ -239,8 +231,8 @@ public interface Listener<E> {
239231
*
240232
* @param task
241233
* @param previousStatus 之前状态
242-
*
243-
* 2017年11月22日 下午3:52:23
234+
* <p>
235+
* 2017年11月22日 下午3:52:23
244236
*/
245237
public void statusUpdated(Task<E> task, Status previousStatus);
246238

@@ -249,8 +241,8 @@ public interface Listener<E> {
249241
*
250242
* @param task 子任务
251243
* @param index 子任务位置
252-
*
253-
* 2017年11月22日 下午3:55:20
244+
* <p>
245+
* 2017年11月22日 下午3:55:20
254246
*/
255247
public void childAdded(Task<E> task, int index);
256248
}

src/main/java/info/xiaomo/gengine/ai/btree/LeafTask.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* game state
2828
* @author implicit-invocation
2929
* @author davebaol
30-
*
3130
*/
3231
@TaskConstraint(minChildren = 0, maxChildren = 0)
3332
public abstract class LeafTask<E> extends Task<E> {

src/main/java/info/xiaomo/gengine/ai/btree/LoopDecorator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
* @param <E> type of the blackboard object that tasks use to read or modify
2525
* game state
2626
* @author davebaol
27-
*
2827
*/
2928
public abstract class LoopDecorator<E> extends Decorator<E> {
3029

src/main/java/info/xiaomo/gengine/ai/btree/Task.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public abstract class Task<E> implements IMemoryObject, Serializable {
5555
*
5656
* @param childTask
5757
* @return 子任务所在下标
58-
*
58+
* <p>
5959
* 2017年11月22日 下午2:54:08
6060
*/
6161
public final int addChild(Task<E> childTask) {
@@ -69,9 +69,7 @@ public final int addChild(Task<E> childTask) {
6969
/**
7070
* 子任务个数
7171
*
72-
* @return
73-
*
74-
* 2017年11月22日 下午4:01:24
72+
* @return 2017年11月22日 下午4:01:24
7573
*/
7674
public abstract int getChildCount();
7775

@@ -80,7 +78,7 @@ public final int addChild(Task<E> childTask) {
8078
*
8179
* @param childTask 子任务
8280
* @return 任务下标
83-
*
81+
* <p>
8482
* 2017年11月22日 下午3:32:26
8583
*/
8684
protected abstract int addChildToTask(Task<E> childTask);
@@ -106,8 +104,8 @@ public final Status getStatus() {
106104

107105
/**
108106
* 设置控制任务
109-
*
110-
*
107+
* <p>
108+
* <p>
111109
* 2017年11月22日 下午4:06:58
112110
*/
113111
public void setControl(Task<E> control) {
@@ -119,9 +117,7 @@ public void setControl(Task<E> control) {
119117
* 检查条件
120118
*
121119
* @param parentTask 父任务
122-
* @return
123-
*
124-
* 2017年11月22日 下午4:09:57
120+
* @return 2017年11月22日 下午4:09:57
125121
*/
126122
public boolean checkGuard(Task<E> parentTask) {
127123
// No guard to check

src/main/java/info/xiaomo/gengine/ai/btree/annotation/TaskAttribute.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
@Target(ElementType.FIELD)
1515
public @interface TaskAttribute {
1616

17-
/**
18-
* Specifies the attribute's name; if empty the name of the field is used instead.
19-
*
20-
* @return the attribute's name or an empty string if the name of the field must be used.
21-
*/
22-
String name() default "";
17+
/**
18+
* Specifies the attribute's name; if empty the name of the field is used instead.
19+
*
20+
* @return the attribute's name or an empty string if the name of the field must be used.
21+
*/
22+
String name() default "";
2323

24-
/**
25-
* Specifies whether the attribute is required or not.
26-
*
27-
* @return {@code true} if the attribute is required; {@code false} if it is optional.
28-
*/
29-
boolean required() default false;
24+
/**
25+
* Specifies whether the attribute is required or not.
26+
*
27+
* @return {@code true} if the attribute is required; {@code false} if it is optional.
28+
*/
29+
boolean required() default false;
3030
}

src/main/java/info/xiaomo/gengine/ai/btree/annotation/TaskConstraint.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
@Documented
1414
public @interface TaskConstraint {
1515

16-
/**
17-
* Returns the minimum number of allowed children, defaults to 0.
18-
*
19-
* @return the minimum number of allowed children.
20-
*/
21-
int minChildren() default 0;
16+
/**
17+
* Returns the minimum number of allowed children, defaults to 0.
18+
*
19+
* @return the minimum number of allowed children.
20+
*/
21+
int minChildren() default 0;
2222

23-
/**
24-
* Returns the maximum number of allowed children, defaults to {@code Integer.MAX_VALUE}.
25-
*
26-
* @return the maximum number of allowed children.
27-
*/
28-
int maxChildren() default Integer.MAX_VALUE;
23+
/**
24+
* Returns the maximum number of allowed children, defaults to {@code Integer.MAX_VALUE}.
25+
*
26+
* @return the maximum number of allowed children.
27+
*/
28+
int maxChildren() default Integer.MAX_VALUE;
2929
}

src/main/java/info/xiaomo/gengine/ai/btree/branch/ScoreSelector.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
* 分数选择器,分数越高,优先执行,只会执行第一个子树
99
*
1010
* @param <E> 黑板对象
11-
*
1211
*/
1312
public abstract class ScoreSelector<E> extends Selector<E> {
1413
/**

src/main/java/info/xiaomo/gengine/ai/btree/decorator/Random.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
* @param <E> type of the blackboard object that tasks use to read or modify
3535
* game state
3636
* @author davebaol
37-
*
3837
*/
3938
@TaskConstraint(minChildren = 0, maxChildren = 1)
4039
public class Random<E> extends Decorator<E> {

src/main/java/info/xiaomo/gengine/ai/fsm/StackStateMachine.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
* @param <E> the type of the entity owning this state machine
3232
* @param <S> the type of the states of this state machine
3333
* @author Daniel Holderbaum
34-
*
3534
*/
3635
public class StackStateMachine<E, S extends State<E>> extends DefaultStateMachine<E, S> {
3736

src/main/java/info/xiaomo/gengine/ai/nav/NavMesh.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
/**
88
* navmesh寻路入口
9-
*
10-
*
119
*/
1210
public abstract class NavMesh {
1311

0 commit comments

Comments
 (0)