574575576577578579580581582583584
case 'D': //Facing down p = m_game.getMapMatrix().getPlayer(Integer.parseInt(message.substring(2))); if(p != null) { p.setDirection(Direction.Down); p.loadSpriteImage(); } break; case 'L': //Facing Left p = m_game.getMapMatrix().getPlayer(Integer.parseInt(message.substring(2)));
582583584585586587588589590591592
case 'L': //Facing Left p = m_game.getMapMatrix().getPlayer(Integer.parseInt(message.substring(2))); if(p != null) { p.setDirection(Direction.Left); p.loadSpriteImage(); } break; case 'R': //Facing Right p = m_game.getMapMatrix().getPlayer(Integer.parseInt(message.substring(2)));
590591592593594595596597598599600
case 'R': //Facing Right p = m_game.getMapMatrix().getPlayer(Integer.parseInt(message.substring(2))); if(p != null) { p.setDirection(Direction.Right); p.loadSpriteImage(); } break; case 'U': //Facing Up p = m_game.getMapMatrix().getPlayer(Integer.parseInt(message.substring(2)));
598599600601602603604605606607608
case 'U': //Facing Up p = m_game.getMapMatrix().getPlayer(Integer.parseInt(message.substring(2))); if(p != null) { p.setDirection(Direction.Up); p.loadSpriteImage(); } break; case 'S': //Sprite change details = message.substring(2).split(",");
607608609610611612613614615616617
//Sprite change details = message.substring(2).split(","); p = m_game.getMapMatrix().getPlayer(Integer.parseInt(details[0])); if(p != null) { p.setSprite(Integer.parseInt(details[1])); p.loadSpriteImage(); } break; } break; case 'U':
694695696697698699700701702703704
break; default: p.setDirection(Direction.Down); break; } p.loadSpriteImage(); } if(p.getId() == m_game.getPlayerId()) { /* * This dude is our player! Store this information */