當前位置: 首頁>>代碼示例>>Java>>正文


Java Human.getID方法代碼示例

本文整理匯總了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;
}
 
開發者ID:RCRS-ADF,項目名稱:sample,代碼行數:21,代碼來源:TestHumanDetector.java

示例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;
}
 
開發者ID:RCRS-ADF,項目名稱:sample,代碼行數:19,代碼來源:TestHumanDetector.java

示例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();
}
 
開發者ID:AIT-Rescue,項目名稱:AIT-Rescue,代碼行數:10,代碼來源:MessageHuman.java

示例4: ActionRescue

import rescuecore2.standard.entities.Human; //導入方法依賴的package包/類
public ActionRescue(TacticsAmbulance tactics, Human human) {
    this(tactics, human.getID());
}
 
開發者ID:AIT-Rescue,項目名稱:AIT-Rescue,代碼行數:4,代碼來源:ActionRescue.java


注:本文中的rescuecore2.standard.entities.Human.getID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。