protected virtual void onDeserialize(TezReader reader) { this.CID = reader.readString(TezReadOnlyString.CID); this.NID = reader.readString(TezReadOnlyString.NID); if (reader.tryRead(TezReadOnlyString.CTG_FT, out string final_token_name)) { this.category = TezCategorySystem.getCategory(final_token_name); } }
public void generateCShapFile() { /* * Json text * * use TezCategorySystem.generateCodeFile to generate a xx.cs file * * { * "Namespace": "tezcat.Framework.Core", * "WrapperClass": "TestCategory", * "Root": { * "Equipment": { * "Armor": [ * "ArmorPlate" * ], * "Weapon": [ * "Gun", * "Axe" * ] * }, * "Unit": { * "Ship": [ * "Frigate" * ] * }, * "T1": { * "T2": { * "T3": [ * "T4", * "T5", * "T6" * ] * }, * "T7": [ * "T8" * ] * } * } * } * * */ TezJsonReader reader = new TezJsonReader(); if (reader.load("xxxxx.json")) { TezCategorySystem.generateCodeFile("MyFilePath", reader); } }
public Table getTable(string tokenName) { return(m_TableList[TezCategorySystem.getToken(tokenName).UID]); }