Skip to content

GameGraph.IO ​

JSONFile 仅客户端 ​

命名空间 GameGraph.IO

csharp
public sealed class JSONFile : Resource

Client-side JSON document resource. File/resource lookup stays on the client; the contained JSONValue is copied across the ABI.

构造函数 ​

JSONFile 仅客户端 ​

csharp
public JSONFile()

属性 ​

Root 仅客户端 ​

csharp
public JSONValue Root { get; set; }

Gets an owned copy of the document root.

方法 ​

Load 仅客户端 ​

csharp
public static JSONFile? Load(string path)

FromString 仅客户端 ​

csharp
public bool FromString(UTF8String source)

FromString 仅客户端 ​

csharp
public bool FromString(string source)

ToString 仅客户端 ​

csharp
public UTF8String ToString(UTF8String indentation = default(UTF8String))

ToJsonString 仅客户端 ​

csharp
public string ToJsonString(string indentation = "\t")

SetRoot 仅客户端 ​

csharp
public void SetRoot(JSONValue value)

Copies a value into the document root.

GetRootCopy 仅客户端 ​

csharp
public JSONValue GetRootCopy()

Returns an owned copy of the document root.

JSONNumberType 双端 ​

命名空间 GameGraph.IO

csharp
public enum JSONNumberType

Numeric representation retained by an Urho JSON value.

枚举值 ​

  • NaN
  • Int
  • UInt
  • FloatDouble

JSONValue 双端 ​

命名空间 GameGraph.IO

csharp
public sealed class JSONValue : DisposableObject

In-memory JSON value tree. This is deliberately separate from JSONFile: it never opens a path and is safe to use in server GameGraph code as well as in the client.

构造函数 ​

JSONValue 双端 ​

csharp
public JSONValue()

JSONValue 双端 ​

csharp
public JSONValue(bool value)

JSONValue 双端 ​

csharp
public JSONValue(int value)

JSONValue 双端 ​

csharp
public JSONValue(uint value)

JSONValue 双端 ​

csharp
public JSONValue(float value)

JSONValue 双端 ​

csharp
public JSONValue(double value)

JSONValue 双端 ​

csharp
public JSONValue(UTF8String value)

属性 ​

ValueType 双端 ​

csharp
public JSONValueType ValueType { get; }

NumberType 双端 ​

csharp
public JSONNumberType NumberType { get; }

ValueTypeName 双端 ​

csharp
public UTF8String ValueTypeName { get; }

NumberTypeName 双端 ​

csharp
public UTF8String NumberTypeName { get; }

IsNull 双端 ​

csharp
public bool IsNull { get; }

IsBool 双端 ​

csharp
public bool IsBool { get; }

IsNumber 双端 ​

csharp
public bool IsNumber { get; }

IsString 双端 ​

csharp
public bool IsString { get; }

IsArray 双端 ​

csharp
public bool IsArray { get; }

IsObject 双端 ​

csharp
public bool IsObject { get; }

BoolValue 双端 ​

csharp
public bool BoolValue { get; }

IntValue 双端 ​

csharp
public int IntValue { get; }

UIntValue 双端 ​

csharp
public uint UIntValue { get; }

FloatValue 双端 ​

csharp
public float FloatValue { get; }

DoubleValue 双端 ​

csharp
public double DoubleValue { get; }

StringValue 双端 ​

csharp
public UTF8String StringValue { get; }

Size 双端 ​

csharp
public uint Size { get; }

方法 ​

FromNative 双端 ​

csharp
public static JSONValue FromNative(NativePtr nativePtr)

Copy 双端 ​

csharp
public JSONValue Copy()

GetIndex 双端 ​

csharp
public JSONValue GetIndex(uint index)

SetIndex 双端 ​

csharp
public void SetIndex(uint index, JSONValue value)

GetKey 双端 ​

csharp
public JSONValue GetKey(UTF8String key)

SetKey 双端 ​

csharp
public void SetKey(UTF8String key, JSONValue value)

SetNull 双端 ​

csharp
public void SetNull()

SetBool 双端 ​

csharp
public void SetBool(bool value)

SetInt 双端 ​

csharp
public void SetInt(int value)

SetUInt 双端 ​

csharp
public void SetUInt(uint value)

SetFloat 双端 ​

csharp
public void SetFloat(float value)

SetDouble 双端 ​

csharp
public void SetDouble(double value)

SetString 双端 ​

csharp
public void SetString(UTF8String value)

Push 双端 ​

csharp
public void Push(JSONValue value)

Pop 双端 ​

csharp
public void Pop()

Insert 双端 ​

csharp
public void Insert(uint index, JSONValue value)

Erase 双端 ​

csharp
public void Erase(uint index, uint length = 1u)

Resize 双端 ​

csharp
public void Resize(uint size)

Erase 双端 ​

csharp
public bool Erase(UTF8String key)

Contains 双端 ​

csharp
public bool Contains(UTF8String key)

GetMemberName 双端 ​

csharp
public UTF8String GetMemberName(uint index)

Clear 双端 ​

csharp
public void Clear()

ToJsonString 双端 ​

csharp
public string ToJsonString()

ToStyledString 双端 ​

csharp
public string ToStyledString(UTF8String indentation = default(UTF8String))

ToString 双端 ​

csharp
public override string ToString()

GetValueTypeName 双端 ​

csharp
public static string GetValueTypeName(JSONValueType type)

GetNumberTypeName 双端 ​

csharp
public static string GetNumberTypeName(JSONNumberType type)

DisposeUnmanaged 双端 ​

csharp
protected override void DisposeUnmanaged(bool finalizing)

JSONValueType 双端 ​

命名空间 GameGraph.IO

csharp
public enum JSONValueType

JSON value kind.

枚举值 ​

  • Null
  • Bool
  • Number
  • String
  • Array
  • Object

Localization 仅客户端 ​

命名空间 GameGraph.IO

csharp
public static class Localization

Client localization subsystem. The returned native subsystem is borrowed from the current gameplay context and is never cached across game sessions.

属性 ​

IsAvailable 仅客户端 ​

csharp
public static bool IsAvailable { get; }

LanguageCount 仅客户端 ​

csharp
public static int LanguageCount { get; }

CurrentLanguageIndex 仅客户端 ​

csharp
public static int CurrentLanguageIndex { get; }

CurrentLanguage 仅客户端 ​

csharp
public static UTF8String CurrentLanguage { get; }

方法 ​

LanguageIndex 仅客户端 ​

csharp
public static int LanguageIndex(UTF8String language)

GetLanguageIndex 仅客户端 ​

csharp
public static int GetLanguageIndex(UTF8String language)

GetLanguageIndexByName 仅客户端 ​

csharp
public static int GetLanguageIndexByName(UTF8String language)

GetLanguage 仅客户端 ​

csharp
public static UTF8String GetLanguage(int index)

SetLanguage 仅客户端 ​

csharp
public static void SetLanguage(int index)

SetLanguage 仅客户端 ​

csharp
public static void SetLanguage(UTF8String language)

Get 仅客户端 ​

csharp
public static UTF8String Get(UTF8String id)

Set 仅客户端 ​

csharp
public static bool Set(UTF8String id, UTF8String value)

Set 仅客户端 ​

csharp
public static bool Set(UTF8String id, UTF8String value, UTF8String language)

Reset 仅客户端 ​

csharp
public static void Reset()

Load 仅客户端 ​

csharp
public static void Load(JSONValue source)

LoadSingleLanguage 仅客户端 ​

csharp
public static void LoadSingleLanguage(JSONValue source, UTF8String language)

LoadFile 仅客户端 ​

csharp
public static void LoadFile(string resourceName, UTF8String language = default(UTF8String))

Matrix3x3 双端 ​

命名空间 GameGraph.IO

csharp
public readonly struct Matrix3x3 : IEquatable<Matrix3x3>

Blittable 3x3 matrix used by Urho's stream format.

构造函数 ​

Matrix3x3 双端 ​

csharp
public Matrix3x3(float M00, float M01, float M02, float M10, float M11, float M12, float M20, float M21, float M22)

Blittable 3x3 matrix used by Urho's stream format.

属性 ​

M00 双端 ​

csharp
public float M00 { get; init; }

M01 双端 ​

csharp
public float M01 { get; init; }

M02 双端 ​

csharp
public float M02 { get; init; }

M10 双端 ​

csharp
public float M10 { get; init; }

M11 双端 ​

csharp
public float M11 { get; init; }

M12 双端 ​

csharp
public float M12 { get; init; }

M20 双端 ​

csharp
public float M20 { get; init; }

M21 双端 ​

csharp
public float M21 { get; init; }

M22 双端 ​

csharp
public float M22 { get; init; }

方法 ​

ToString 双端 ​

csharp
public override string ToString()

operator != 双端 ​

csharp
public static bool operator !=(Matrix3x3 left, Matrix3x3 right)

operator == 双端 ​

csharp
public static bool operator ==(Matrix3x3 left, Matrix3x3 right)

GetHashCode 双端 ​

csharp
public override int GetHashCode()

Equals 双端 ​

csharp
public override bool Equals(object obj)

Equals 双端 ​

csharp
public bool Equals(Matrix3x3 other)

Deconstruct 双端 ​

csharp
public void Deconstruct(out float M00, out float M01, out float M02, out float M10, out float M11, out float M12, out float M20, out float M21, out float M22)

VectorBuffer 双端 ​

命名空间 GameGraph.IO

csharp
public sealed class VectorBuffer : DisposableObject

In-memory Urho serializer/deserializer. It never opens a host file or exposes a native pointer to the backing byte array, so it is safe on both GameGraph ends.

构造函数 ​

VectorBuffer 双端 ​

csharp
public VectorBuffer()

VectorBuffer 双端 ​

csharp
public VectorBuffer(byte[] data)

属性 ​

Size 双端 ​

csharp
public uint Size { get; }

Position 双端 ​

csharp
public uint Position { get; }

Tell 双端 ​

csharp
public uint Tell { get; }

Checksum 双端 ​

csharp
public uint Checksum { get; }

IsEof 双端 ​

csharp
public bool IsEof { get; }

Name 双端 ​

csharp
public UTF8String Name { get; }

方法 ​

FromNative 双端 ​

csharp
public static VectorBuffer? FromNative(NativePtr nativePtr)

ToArray 双端 ​

csharp
public byte[] ToArray()

SetData 双端 ​

csharp
public void SetData(byte[] data)

Clear 双端 ​

csharp
public void Clear()

Resize 双端 ​

csharp
public void Resize(uint size)

Seek 双端 ​

csharp
public uint Seek(uint position)

SeekRelative 双端 ​

csharp
public uint SeekRelative(int delta)

ReadBytes 双端 ​

csharp
public byte[] ReadBytes(uint size)

WriteBytes 双端 ​

csharp
public uint WriteBytes(byte[] data)

Read 双端 ​

csharp
public VectorBuffer Read(uint size)

Read an exact raw chunk as a new independent buffer.

Write 双端 ​

csharp
public uint Write(VectorBuffer source)

Append the complete contents of another buffer as raw bytes.

ReadBuffer 双端 ​

csharp
public byte[] ReadBuffer()

WriteBuffer 双端 ​

csharp
public bool WriteBuffer(byte[] data)

ReadInt 双端 ​

csharp
public int ReadInt()

ReadInt64 双端 ​

csharp
public long ReadInt64()

ReadShort 双端 ​

csharp
public short ReadShort()

ReadByte 双端 ​

csharp
public sbyte ReadByte()

ReadUInt 双端 ​

csharp
public uint ReadUInt()

ReadUInt64 双端 ​

csharp
public ulong ReadUInt64()

ReadUShort 双端 ​

csharp
public ushort ReadUShort()

ReadUByte 双端 ​

csharp
public byte ReadUByte()

ReadBool 双端 ​

csharp
public bool ReadBool()

ReadFloat 双端 ​

csharp
public float ReadFloat()

ReadDouble 双端 ​

csharp
public double ReadDouble()

ReadIntRect 双端 ​

csharp
public Rectangle ReadIntRect()

ReadIntVector2 双端 ​

csharp
public IntVector2 ReadIntVector2()

ReadIntVector3 双端 ​

csharp
public IntVector3 ReadIntVector3()

ReadRect 双端 ​

csharp
public RectangleF ReadRect()

ReadVector2 双端 ​

csharp
public Vector2 ReadVector2()

ReadVector3 双端 ​

csharp
public Vector3 ReadVector3()

ReadMagicScale 双端 ​

csharp
public Vector3 ReadMagicScale()

ReadPackedVector3 双端 ​

csharp
public Vector3 ReadPackedVector3(float maxAbsCoord)

ReadVector4 双端 ​

csharp
public Vector4 ReadVector4()

ReadQuaternion 双端 ​

csharp
public Quaternion ReadQuaternion()

ReadPackedQuaternion 双端 ​

csharp
public Quaternion ReadPackedQuaternion()

ReadMatrix3 双端 ​

csharp
public Matrix3x3 ReadMatrix3()

ReadMatrix3x4 双端 ​

csharp
public Matrix4x4 ReadMatrix3x4()

ReadMatrix4 双端 ​

csharp
public Matrix4x4 ReadMatrix4()

ReadColor 双端 ​

csharp
public Color ReadColor()

ReadBoundingBox 双端 ​

csharp
public BoundingBox ReadBoundingBox()

ReadString 双端 ​

csharp
public UTF8String ReadString()

ReadFileID 双端 ​

csharp
public UTF8String ReadFileID()

ReadStringHash 双端 ​

csharp
public uint ReadStringHash()

ReadVLE 双端 ​

csharp
public uint ReadVLE()

ReadNetID 双端 ​

csharp
public uint ReadNetID()

ReadLine 双端 ​

csharp
public UTF8String ReadLine()

ReadStringAsBuffer 双端 ​

csharp
public UTF8String ReadStringAsBuffer()

WriteInt 双端 ​

csharp
public bool WriteInt(int value)

WriteInt64 双端 ​

csharp
public bool WriteInt64(long value)

WriteShort 双端 ​

csharp
public bool WriteShort(short value)

WriteByte 双端 ​

csharp
public bool WriteByte(sbyte value)

WriteUInt 双端 ​

csharp
public bool WriteUInt(uint value)

WriteUInt64 双端 ​

csharp
public bool WriteUInt64(ulong value)

WriteUShort 双端 ​

csharp
public bool WriteUShort(ushort value)

WriteUByte 双端 ​

csharp
public bool WriteUByte(byte value)

WriteBool 双端 ​

csharp
public bool WriteBool(bool value)

WriteFloat 双端 ​

csharp
public bool WriteFloat(float value)

WriteDouble 双端 ​

csharp
public bool WriteDouble(double value)

WriteIntRect 双端 ​

csharp
public bool WriteIntRect(Rectangle value)

WriteIntVector2 双端 ​

csharp
public bool WriteIntVector2(IntVector2 value)

WriteIntVector3 双端 ​

csharp
public bool WriteIntVector3(IntVector3 value)

WriteRect 双端 ​

csharp
public bool WriteRect(RectangleF value)

WriteVector2 双端 ​

csharp
public bool WriteVector2(Vector2 value)

WriteVector3 双端 ​

csharp
public bool WriteVector3(Vector3 value)

WritePackedVector3 双端 ​

csharp
public bool WritePackedVector3(Vector3 value, float maxAbsCoord)

WriteVector4 双端 ​

csharp
public bool WriteVector4(Vector4 value)

WriteQuaternion 双端 ​

csharp
public bool WriteQuaternion(Quaternion value)

WritePackedQuaternion 双端 ​

csharp
public bool WritePackedQuaternion(Quaternion value)

WriteMatrix3 双端 ​

csharp
public bool WriteMatrix3(Matrix3x3 value)

WriteMatrix3x4 双端 ​

csharp
public bool WriteMatrix3x4(Matrix4x4 value)

WriteMatrix4 双端 ​

csharp
public bool WriteMatrix4(Matrix4x4 value)

WriteColor 双端 ​

csharp
public bool WriteColor(Color value)

WriteBoundingBox 双端 ​

csharp
public bool WriteBoundingBox(BoundingBox value)

WriteString 双端 ​

csharp
public bool WriteString(UTF8String value)

WriteFileID 双端 ​

csharp
public bool WriteFileID(UTF8String value)

WriteStringHash 双端 ​

csharp
public bool WriteStringHash(uint value)

WriteVLE 双端 ​

csharp
public bool WriteVLE(uint value)

WriteNetID 双端 ​

csharp
public bool WriteNetID(uint value)

WriteLine 双端 ​

csharp
public bool WriteLine(UTF8String value)

WriteStringAsBuffer 双端 ​

csharp
public bool WriteStringAsBuffer(UTF8String value)

ReadVariant 双端 ​

csharp
public Variant ReadVariant()

ReadVariant 双端 ​

csharp
public Variant ReadVariant(VariantType type)

WriteVariant 双端 ​

csharp
public bool WriteVariant(Variant value)

WriteVariantData 双端 ​

csharp
public bool WriteVariantData(Variant value)

ReadVariantVector 双端 ​

csharp
public Variant[] ReadVariantVector()

WriteVariantVector 双端 ​

csharp
public bool WriteVariantVector(IEnumerable<Variant> values)

ReadVariantMap 双端 ​

csharp
public Dictionary<uint, Variant> ReadVariantMap()

WriteVariantMap 双端 ​

csharp
public bool WriteVariantMap(IReadOnlyDictionary<uint, Variant> values)

ReadStringVector 双端 ​

csharp
public UTF8String[] ReadStringVector()

WriteStringVector 双端 ​

csharp
public bool WriteStringVector(IEnumerable<UTF8String> values)

Compress 双端 ​

csharp
public VectorBuffer Compress()

Decompress 双端 ​

csharp
public VectorBuffer Decompress()

EstimateCompressBound 双端 ​

csharp
public static uint EstimateCompressBound(uint sourceSize)

DisposeUnmanaged 双端 ​

csharp
protected override void DisposeUnmanaged(bool finalizing)

XMLElement 仅客户端 ​

命名空间 GameGraph.IO

csharp
public sealed class XMLElement : DisposableObject

Owned XML element handle. The native handle pins its owning XML document, so it is safe to retain this object while the XMLFile wrapper is collected.

属性 ​

IsNull 仅客户端 ​

csharp
public bool IsNull { get; }

NotNull 仅客户端 ​

csharp
public bool NotNull { get; }

Name 仅客户端 ​

csharp
public UTF8String Name { get; }

AttributeCount 仅客户端 ​

csharp
public uint AttributeCount { get; }

Value 仅客户端 ​

csharp
public UTF8String Value { get; }

Text 仅客户端 ​

csharp
public UTF8String Text { get; }

Parent 仅客户端 ​

csharp
public XMLElement? Parent { get; }

方法 ​

HasChild 仅客户端 ​

csharp
public bool HasChild(UTF8String name)

HasAttribute 仅客户端 ​

csharp
public bool HasAttribute(UTF8String name)

GetAttribute 仅客户端 ​

csharp
public UTF8String GetAttribute(UTF8String name)

GetAttributeLower 仅客户端 ​

csharp
public UTF8String GetAttributeLower(UTF8String name)

GetAttributeUpper 仅客户端 ​

csharp
public UTF8String GetAttributeUpper(UTF8String name)

GetAttributeName 仅客户端 ​

csharp
public UTF8String GetAttributeName(uint index)

CreateChild 仅客户端 ​

csharp
public XMLElement? CreateChild(UTF8String name)

GetOrCreateChild 仅客户端 ​

csharp
public XMLElement? GetOrCreateChild(UTF8String name)

GetChild 仅客户端 ​

csharp
public XMLElement? GetChild(UTF8String name = default(UTF8String))

GetNext 仅客户端 ​

csharp
public XMLElement? GetNext(UTF8String name = default(UTF8String))

AppendChild 仅客户端 ​

csharp
public bool AppendChild(XMLElement child, bool asCopy = false)

Remove 仅客户端 ​

csharp
public bool Remove()

RemoveChild 仅客户端 ​

csharp
public bool RemoveChild(XMLElement child)

RemoveChild 仅客户端 ​

csharp
public bool RemoveChild(UTF8String name)

RemoveChildren 仅客户端 ​

csharp
public bool RemoveChildren(UTF8String name = default(UTF8String))

SetValue 仅客户端 ​

csharp
public bool SetValue(UTF8String value)

Copy 仅客户端 ​

csharp
public void Copy(XMLElement source)

SetAttribute 仅客户端 ​

csharp
public bool SetAttribute(UTF8String name, UTF8String value)

SetString 仅客户端 ​

csharp
public bool SetString(UTF8String name, UTF8String value)

SetBool 仅客户端 ​

csharp
public bool SetBool(UTF8String name, bool value)

SetFloat 仅客户端 ​

csharp
public bool SetFloat(UTF8String name, float value)

SetDouble 仅客户端 ​

csharp
public bool SetDouble(UTF8String name, double value)

SetUInt 仅客户端 ​

csharp
public bool SetUInt(UTF8String name, uint value)

SetInt 仅客户端 ​

csharp
public bool SetInt(UTF8String name, int value)

SetUInt64 仅客户端 ​

csharp
public bool SetUInt64(UTF8String name, ulong value)

SetInt64 仅客户端 ​

csharp
public bool SetInt64(UTF8String name, long value)

RemoveAttribute 仅客户端 ​

csharp
public bool RemoveAttribute(UTF8String name)

GetBool 仅客户端 ​

csharp
public bool GetBool(UTF8String name)

GetFloat 仅客户端 ​

csharp
public float GetFloat(UTF8String name)

GetDouble 仅客户端 ​

csharp
public double GetDouble(UTF8String name)

GetUInt 仅客户端 ​

csharp
public uint GetUInt(UTF8String name)

GetInt 仅客户端 ​

csharp
public int GetInt(UTF8String name)

GetUInt64 仅客户端 ​

csharp
public ulong GetUInt64(UTF8String name)

GetInt64 仅客户端 ​

csharp
public long GetInt64(UTF8String name)

DisposeUnmanaged 仅客户端 ​

csharp
protected override void DisposeUnmanaged(bool finalizing)

XMLFile 仅客户端 ​

命名空间 GameGraph.IO

csharp
public sealed class XMLFile : Resource

Client-side XML document resource.

构造函数 ​

XMLFile 仅客户端 ​

csharp
public XMLFile()

方法 ​

Load 仅客户端 ​

csharp
public static XMLFile? Load(string path)

FromString 仅客户端 ​

csharp
public bool FromString(string source)

ToXmlString 仅客户端 ​

csharp
public string ToXmlString(string indentation = "\t")

CreateRoot 仅客户端 ​

csharp
public XMLElement? CreateRoot(string name)

GetOrCreateRoot 仅客户端 ​

csharp
public XMLElement? GetOrCreateRoot(string name)

GetRoot 仅客户端 ​

csharp
public XMLElement? GetRoot(string name = "")

Patch 仅客户端 ​

csharp
public void Patch(XMLFile patchFile)

Patch 仅客户端 ​

csharp
public void Patch(XMLElement patchElement)