本文整理汇总了Java中com.jme3.export.InputCapsule.readLong方法的典型用法代码示例。如果您正苦于以下问题:Java InputCapsule.readLong方法的具体用法?Java InputCapsule.readLong怎么用?Java InputCapsule.readLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.export.InputCapsule
的用法示例。
在下文中一共展示了InputCapsule.readLong方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
type = ic.readByte("type", (byte) 0);
switch (type) {
case 0:
value = ic.readInt("intVal", 0);
break;
case 1:
value = ic.readFloat("floatVal", 0f);
break;
case 2:
value = ic.readBoolean("boolVal", false);
break;
case 3:
value = ic.readString("strVal", null);
break;
case 4:
value = ic.readLong("longVal", 0l);
break;
default:
throw new UnsupportedOperationException();
}
}
示例2: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
saveName = ic.readString("saveName", "unknow");
saveTime = ic.readLong("saveTime", 0);
storyCount = ic.readInt("storyCount", 0);
player = (EntityData) ic.readSavable("player", null);
ArrayList<ShortcutSave> tempShortcuts = ic.readSavableArrayList("shortcuts", null);
shortcuts.clear();
if (tempShortcuts != null) {
shortcuts.addAll(tempShortcuts);
}
ArrayList<EntityData> tempActors = ic.readSavableArrayList("actors", null);
actors.clear();
if (tempActors != null) {
actors.addAll(tempActors);
}
ArrayList<ClientData> tempClientDatas = ic.readSavableArrayList("clientDatas", null);
clientDatas.clear();
if (tempClientDatas != null) {
clientDatas.addAll(tempClientDatas);
}
}
示例3: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
clientId = ic.readString("clientId", null);
gameId = ic.readString("gameId", null);
actorId = ic.readLong("actorId", -1);
}
示例4: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
id = ic.readString("id", null);
uniqueId = ic.readLong("uniqueId", 0);
localData = (HashMap<String, Savable>) ic.readStringSavableMap("localData", null);
}
示例5: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
value = ic.readLong("v", 0L);
}
示例6: read
import com.jme3.export.InputCapsule; //导入方法依赖的package包/类
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
type = ic.readByte("type", (byte) 0);
switch (type) {
case TYPE_INTEGER:
value = ic.readInt("intVal", 0);
break;
case TYPE_FLOAT:
value = ic.readFloat("floatVal", 0f);
break;
case TYPE_BOOLEAN:
value = ic.readBoolean("boolVal", false);
break;
case TYPE_STRING:
value = ic.readString("strVal", null);
break;
case TYPE_LONG:
value = ic.readLong("longVal", 0l);
break;
case TYPE_SAVABLE:
value = ic.readSavable("savableVal", null);
break;
case TYPE_LIST:
value = this.readList(ic, "0");
break;
case TYPE_MAP:
Map<Object, Object> map = new HashMap<Object, Object>();
List<?> keys = this.readList(ic, "0");
List<?> values = this.readList(ic, "1");
for (int i = 0; i < keys.size(); ++i) {
map.put(keys.get(i), values.get(i));
}
value = map;
break;
case TYPE_ARRAY:
value = this.readList(ic, "0").toArray();
break;
default:
throw new UnsupportedOperationException("Unknown type of stored data: " + type);
}
}