public void createCharacter(String charName, CharacterClass charClass) { UserCharacter create = new UserCharacter(); create.charClass = charClass; create.charName = charName; client.sendTCP(create); }
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); } }