本文整理匯總了Java中rescuecore2.standard.entities.Human.getID方法的典型用法代碼示例。如果您正苦於以下問題:Java Human.getID方法的具體用法?Java Human.getID怎麽用?Java Human.getID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rescuecore2.standard.entities.Human
的用法示例。
在下文中一共展示了Human.getID方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: calc
import rescuecore2.standard.entities.Human; //導入方法依賴的package包/類
@Override
public HumanDetector calc() {
Human transportHuman = this.agentInfo.someoneOnBoard();
if (transportHuman != null) {
logger.debug("someoneOnBoard:" + transportHuman);
this.result = transportHuman.getID();
return this;
}
if (this.result != null) {
Human target = (Human) this.worldInfo.getEntity(this.result);
if (!isValidHuman(target)) {
logger.debug("Invalid Human:" + target + " ==>reset target");
this.result = null;
}
}
if (this.result == null) {
this.result = calcTarget();
}
return this;
}
示例2: calcTarget
import rescuecore2.standard.entities.Human; //導入方法依賴的package包/類
private EntityID calcTarget() {
List<Human> rescueTargets = filterRescueTargets(this.worldInfo.getEntitiesOfType(CIVILIAN));
List<Human> rescueTargetsInCluster = filterInCluster(rescueTargets);
List<Human> targets = rescueTargetsInCluster;
if (targets.isEmpty())
targets = rescueTargets;
logger.debug("Targets:"+targets);
if (!targets.isEmpty()) {
targets.sort(new DistanceSorter(this.worldInfo, this.agentInfo.me()));
Human selected = targets.get(0);
logger.debug("Selected:"+selected);
return selected.getID();
}
return null;
}
示例3: MessageHuman
import rescuecore2.standard.entities.Human; //導入方法依賴的package包/類
public MessageHuman(int messageID, Human human)
{
super(messageID);
humanID = human.getID();
humanHP = human.getHP();
humanBuriedness = human.getBuriedness();
humanDamage = human.getDamage();
humanPosition = human.getPosition();
}
示例4: ActionRescue
import rescuecore2.standard.entities.Human; //導入方法依賴的package包/類
public ActionRescue(TacticsAmbulance tactics, Human human) {
this(tactics, human.getID());
}