|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.pogamut.MessageObjects.MessageObject
cz.cuni.pogamut.MessageObjects.NavPoint
public class NavPoint
NavPoint carries information about Unreal NavPoint - location, reachability,
its neighbours and in case it is respawn point, class of item that respawn.
It is one of compressed messages, so it implements diff and update
Can be delta message
Field Summary | |
---|---|
java.lang.String |
classOfPreferedWeapon
prefered weapon to use at the spot - like XWeapons.ClassicSniperRifle on the snipingSpot |
java.lang.String |
flag
could be PathNode, PlayerStart, InventorySpot, AIMarker. |
private int |
hashCode
hash code for astar |
private boolean |
hashComputed
thanks to weird hashcode flag if hashcode has been specified |
Item |
item
If there is an item spawned in the same location it's saved here. |
java.lang.String |
itemClass
Class of respawn item, "None" if no item is respawning there TODO: NOT SUPPORTED RIGHT NOW |
int |
itemID
id of item laying on the NavPoint, when 0, there is not any |
java.lang.String |
itemUnrealID
unrelID of item laying on the NavPoint, when null, there is not any |
Triple |
location
Location of navpoint |
java.util.ArrayList<NeighNav> |
neighbours
List of neighbours |
java.util.Map<java.lang.Integer,NeighNav> |
neighboursMap
Neighbours: int id of neighbour navpoint -> NeighNav leading to the navpoint id |
boolean |
reachable
Is there no obstacle in way bot-navpoint = can bot run there directly? |
boolean |
roamingSpot
roaming spot is a place to make an ambush |
Triple |
rotation
rotation - which direction agent should face to on the roamingSpot, snipingSpot |
boolean |
snipingSpot
sniping spot is a place to use a sniper rifle from;) |
Fields inherited from class cz.cuni.pogamut.MessageObjects.MessageObject |
---|
ID, type, types, UnrealID, visible |
Constructor Summary | |
---|---|
NavPoint()
|
|
NavPoint(int ID,
java.lang.String UnrealID,
Triple location,
boolean reachable,
boolean visible,
java.util.ArrayList<NeighNav> neighbours,
java.util.Map<java.lang.Integer,NeighNav> neighboursMap,
int hashCode,
java.lang.String itemClass,
Item item,
int itemID,
java.lang.String itemUnrealID,
java.lang.String flag,
Triple rotation,
boolean snipingSpot,
boolean roamingSpot,
java.lang.String classOfPreferedWeapon)
copy constructor... |
|
NavPoint(NavPoint original)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
clone object - for hard copying |
boolean |
diff(MessageObject old)
change this object that all properties that are same as old will be set to null or 0 or similar. |
java.lang.String |
getFlag()
|
private int |
getHashCode()
|
Triple |
getLocation()
|
NeighNav |
getNeighNavToNavpoint(int neighbourNavPointId)
Returns you an edge leading to the neighbourNavPointId (if there is one, otherwise returns null). |
java.lang.String |
getPreferedWeaponClass()
|
Triple |
getRotation()
|
int |
hashCode()
|
boolean |
hasID()
|
boolean |
hasNeighbour(int neighbourNavPointId)
tells you whether this navpoint has as a neighbour another navpoint, meaning |
boolean |
isReachable()
|
boolean |
isRoamingSpot()
|
boolean |
isSnipingSpot()
|
boolean |
isVisible()
|
void |
setLocation(Triple newLocation)
|
java.lang.String |
toString()
|
void |
update(MessageObject newMsgObj)
Writes non-null information from newMsgObj to current one. |
Methods inherited from class cz.cuni.pogamut.MessageObjects.MessageObject |
---|
equals, getID, getType, getUnrealID, getVisibility, setID, setType, setUnrealID, setVisible |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Triple location
public java.lang.String itemClass
public java.util.ArrayList<NeighNav> neighbours
public java.util.Map<java.lang.Integer,NeighNav> neighboursMap
private boolean hashComputed
private int hashCode
public boolean reachable
public Item item
public int itemID
public java.lang.String itemUnrealID
public java.lang.String flag
public Triple rotation
public boolean roamingSpot
public boolean snipingSpot
public java.lang.String classOfPreferedWeapon
Constructor Detail |
---|
public NavPoint(int ID, java.lang.String UnrealID, Triple location, boolean reachable, boolean visible, java.util.ArrayList<NeighNav> neighbours, java.util.Map<java.lang.Integer,NeighNav> neighboursMap, int hashCode, java.lang.String itemClass, Item item, int itemID, java.lang.String itemUnrealID, java.lang.String flag, Triple rotation, boolean snipingSpot, boolean roamingSpot, java.lang.String classOfPreferedWeapon)
public NavPoint(NavPoint original)
public NavPoint()
Method Detail |
---|
public boolean hasNeighbour(int neighbourNavPointId)
neighbourNavPointId
-
public NeighNav getNeighNavToNavpoint(int neighbourNavPointId)
neighbourNavPointId
-
public boolean hasID()
hasID
in class MessageObject
private int getHashCode()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
MessageObject
clone
in class MessageObject
public Triple getLocation()
getLocation
in interface Located
public boolean isSnipingSpot()
public boolean isRoamingSpot()
public java.lang.String getPreferedWeaponClass()
public java.lang.String getFlag()
public Triple getRotation()
public void setLocation(Triple newLocation)
public boolean isReachable()
public boolean isVisible()
isVisible
in class MessageObject
public boolean diff(MessageObject old)
MessageObject
diff
in class MessageObject
old
- Object we use as reference for change.
public void update(MessageObject newMsgObj)
MessageObject
update
in class MessageObject
public java.lang.String toString()
toString
in class MessageObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |