19.12.2009, 19:42
|
#2
|
|
Местный
Регистрация: 10.10.2009
Адрес: Донецкая обл.
Сообщений: 463
|
Цитата:
Сообщение от Novichok8
public void setTarget(Actor actor) {
target = actor;
if (target != null) {
if (type != 1 && type != 2) {
if (target instanceof PAir)
setType(0);
else
setType(3);
} else if (target instanceof PPoint) {
if (target.getOwner() instanceof PathChief) {
PathChief pathchief = (PathChief) target.getOwner();
if (!PlMisChief.isAirport(pathchief._iType,
pathchief._iItem))
target = null;
} else
target = null;
} else if (!"true".equals(Property.stringValue(target.getCla ss(),
"IsAirport",
null)))
target = null;
}
}
этот код вкл привязку на цель
как сделать чтобы их стало 2 или более?
target = actor; это отвечает за нее еслу удалить он не назначает ее вообще если просто 2 раза написать не какого толка.
|
создать target2
|
|
|