Пример #1
0
 public void draw(Graphics g, Screen s) {
   int x = s.translateXToScreen(location.xInt());
   int y = s.translateYToScreen(location.yInt());
   if (team != null)
     draw(g, x, y, angle.getValue(), sightAngle.getValue(), 1, (int) (team.getByte()), kills);
   else draw(g, x, y, angle.getValue(), sightAngle.getValue(), 1, -1, kills);
 }
Пример #2
0
 public ArrayList<Cell> seenCells(Team team) {
   ArrayList<Cell> c = new ArrayList<Cell>();
   if (team.equals(Team.team1)) {
     c.addAll(sightTower1);
     c.addAll(sightHero(team1));
   } else {
     c.addAll(sightTower2);
     c.addAll(sightHero(team2));
   }
   return c;
 }
Пример #3
0
 public byte[] getData() {
   byte[] coord = location.getBytes();
   byte[] bytekills = Util.getBytes(kills);
   byte teamByte;
   if (team == null) teamByte = (byte) -1;
   else teamByte = team.getByte();
   return new byte[] {
     coord[0],
     coord[1],
     coord[2],
     coord[3],
     angle.getByte(),
     sightAngle.getByte(),
     getState(),
     teamByte,
     client,
     bytekills[0],
     bytekills[1]
   };
 }
Пример #4
0
 public void resetLocation() {
   if (team != null) location.set(team.getLocation());
   else location.set(world.getBounds().random());
 }