示例#1
0
  public void createCharacter(String charName, CharacterClass charClass) {
    UserCharacter create = new UserCharacter();
    create.charClass = charClass;
    create.charName = charName;

    client.sendTCP(create);
  }
示例#2
0
  public void attack() {
    if (usersCharacterInstance.canAttack()) {
      Attack attack = new Attack();
      attack.time = new Date();
      UserCharacter tempChar = usersCharacterInstance.getCharacter();
      usersCharacterInstance.attack();

      Vector3 position = usersCharacterInstance.getPosition();
      tempChar.x = position.x;
      tempChar.y = position.y;
      tempChar.z = position.z;
      tempChar.r = usersCharacterInstance.getRotation();

      attack.character = tempChar;
      client.sendTCP(attack);
    }
  }