com.badlogic.gdx.utils.Json.writeValue()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中com.badlogic.gdx.utils.Json.writeValue()方法的一些代码示例,展示了Json.writeValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Json.writeValue()方法的具体详情如下:
包路径:com.badlogic.gdx.utils.Json
类名称:Json
方法名:writeValue

Json.writeValue介绍

[英]Writes the value, without writing the class of the object.
[中]写入值,而不写入对象的类。

代码示例

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  json.writeValue("alpha", alphaValue);
  json.writeValue("color", colorValue);
}

代码示例来源:origin: libgdx/libgdx

/** Writes the value, writing the class of the object if it differs from the specified known type.
 * @param value May be null.
 * @param knownType May be null if the type is unknown. */
public void writeValue (Object value, Class knownType) {
  writeValue(value, knownType, null);
}

代码示例来源:origin: libgdx/libgdx

/** Writes the value, writing the class of the object if it differs from the specified known type.
 * @param value May be null.
 * @param knownType May be null if the type is unknown. */
public void writeValue (Object value, Class knownType) {
  writeValue(value, knownType, null);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  json.writeValue("alpha", alphaValue);
  json.writeValue("color", colorValue);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  json.writeValue("minParticleCount", minParticleCount);
  json.writeValue("maxParticleCount", maxParticleCount);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("continous", continuous);
  json.writeValue("emission", emissionValue);
  json.writeValue("delay", delayValue);
  json.writeValue("duration", durationValue);
  json.writeValue("life", lifeValue);
  json.writeValue("lifeOffset", lifeOffsetValue);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  json.writeValue("filename", filename);
  json.writeValue("type", type.getName());
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("spawnWidthValue", spawnWidthValue);
  json.writeValue("spawnHeightValue", spawnHeightValue);
  json.writeValue("spawnDepthValue", spawnDepthValue);
  json.writeValue("edges", edges);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  json.writeValue("unique", uniqueData, ObjectMap.class);
  json.writeValue("data", data, Array.class, SaveData.class);
  json.writeValue("assets", sharedAssets.toArray(AssetData.class), AssetData[].class);
  json.writeValue("resource", resource, null);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  json.writeValue("unique", uniqueData, ObjectMap.class);
  json.writeValue("data", data, Array.class, SaveData.class);
  json.writeValue("assets", sharedAssets.toArray(AssetData.class), AssetData[].class);
  json.writeValue("resource", resource, null);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("xOffsetValue", xOffsetValue);
  json.writeValue("yOffsetValue", yOffsetValue);
  json.writeValue("zOffsetValue", zOffsetValue);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("xOffsetValue", xOffsetValue);
  json.writeValue("yOffsetValue", yOffsetValue);
  json.writeValue("zOffsetValue", zOffsetValue);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  json.writeValue("data", data, ObjectMap.class);
  json.writeValue("indices", assets.toArray(), int[].class);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("colors", colors);
  json.writeValue("timeline", timeline);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("lowMin", lowMin);
  json.writeValue("lowMax", lowMax);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("strengthValue", strengthValue);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("value", value);
}

代码示例来源:origin: libgdx/libgdx

@Override
public void write (Json json) {
  super.write(json);
  json.writeValue("side", side);
}

代码示例来源:origin: libgdx/libgdx

/** @param knownType May be null if the type is unknown.
 * @param elementType May be null if the type is unknown. */
public void toJson (Object object, Class knownType, Class elementType, Writer writer) {
  setWriter(writer);
  try {
    writeValue(object, knownType, elementType);
  } finally {
    StreamUtils.closeQuietly(this.writer);
    this.writer = null;
  }
}

代码示例来源:origin: libgdx/libgdx

/** @param knownType May be null if the type is unknown.
 * @param elementType May be null if the type is unknown. */
public void toJson (Object object, Class knownType, Class elementType, Writer writer) {
  setWriter(writer);
  try {
    writeValue(object, knownType, elementType);
  } finally {
    StreamUtils.closeQuietly(this.writer);
    this.writer = null;
  }
}

相关文章