예제 #1
0
        protected override BehaviorInfo DeserializeJson(DeserializationHelper helper)
        {
            var triggerId    = helper.GetValue <int>("triggerId");
            var entryBlockId = helper.GetValue <int>("entryBlockId");
            var blocks       = helper.GetArrayValue <BlockInfo>("blocks");

            return(new BehaviorInfo(triggerId, entryBlockId, blocks));
        }
예제 #2
0
        protected override InventoryItem DeserializeJson(DeserializationHelper helper)
        {
            int pid   = helper.GetValue <int>("pid");
            int count = helper.GetValue("count", 0);

            PartInfo part = DataManager.Instance.GetPart(pid);

            return(new InventoryItem(part, count));
        }