本文整理汇总了Java中de.gymdon.inf1315.game.Translation类的典型用法代码示例。如果您正苦于以下问题:Java Translation类的具体用法?Java Translation怎么用?Java Translation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Translation类属于de.gymdon.inf1315.game包,在下文中一共展示了Translation类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: leave
import de.gymdon.inf1315.game.Translation; //导入依赖的package包/类
public void leave(String message) {
if (left)
return;
left = true;
if(properties.containsKey("translation") && !ping) {
Translation t = (Translation)properties.get("translation");
System.out.println(t.translate("client.left", message));
}
if(message == null)
throw new NullPointerException();
try {
socket.close();
} catch (IOException e) {
}
Client.instance.remotes.remove(this);
}
示例2: Server
import de.gymdon.inf1315.game.Translation; //导入依赖的package包/类
public Server() {
if (instance != null)
throw new RuntimeException("Already running");
instance = this;
Remote.isServer = true;
translation = new Translation("en");
this.connectionHandler = new ConnectionHandler(this);
this.timer = new Timer(connectionHandler);
this.readPreferences();
if(!preferences.language.equals("en"))
translation.load(preferences.language);
this.run();
}
示例3: leave
import de.gymdon.inf1315.game.Translation; //导入依赖的package包/类
public void leave(String message) {
if (left)
return;
left = true;
if(properties.containsKey("translation")) {
Translation t = (Translation)properties.get("translation");
System.out.println(t.translate("client.left", message));
}
if(message == null)
throw new NullPointerException();
try {
socket.close();
} catch (IOException e) {
}
}