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); }
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; }
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] }; }
public void resetLocation() { if (team != null) location.set(team.getLocation()); else location.set(world.getBounds().random()); }