📄 behaviorgroup.java
字号:
package fr.umlv.fourmIR2000.insect.behaviors;
import java.io.Serializable;
import fr.umlv.fourmIR2000.insect.Insect;
import fr.umlv.fourmIR2000.world.WorldPoint;
public final class BehaviorGroup extends Behavior implements Serializable {
/** For serialization : version of the class */
private static final long serialVersionUID = 1L;
BehaviorGroup() {
/* nothing */
}
/**
* Do the appropriated action for the insect
* @param insect the insect we work with
* @return true if an action has been executed, else false
*/
@Override public boolean doAction(final Insect insect) {
// If no vital action has been done
if (! super.doAction(insect)) {
final WorldPoint refPoint = insect.getRefPoint();
if (refPoint != null)
insect.move();
}
return true;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -