public JSONObject jsonify() { JSONObject json = new JSONObject(JSONObject.Type.OBJECT); json.AddField("name", Name); json.AddField("basevalue", BaseValue); json.AddField("level", Level); json.AddField("levelcap", LevelCap); json.AddField("tier", Tier); json.AddField("growth", GrowthFactor); JSONObject stats = new JSONObject(JSONObject.Type.ARRAY); foreach (float stat in getStatsInList()) { stats.Add(stat); } json.AddField("stats", stats); JSONObject dist = new JSONObject(JSONObject.Type.ARRAY); foreach (EvaluationProtocol.Stats stat in getDistribution()) { dist.Add(stat.ToString()); } json.AddField("distribution", dist); json.AddField("type", type.ToString()); return(json); }
public static BoneType ToBoneType(this ArmType _this) { switch (_this) { case ArmType.LeftHand: return(BoneType.LeftHand); case ArmType.RightHand: return(BoneType.RightHand); default: throw new ArgumentException(_this.ToString()); } }