Exemplo n.º 1
0
        /// <summary>
        /// Fills this object's data from a <see cref="JSONNode"/>.
        /// </summary>
        public override void Deserialize(JSONNode node)
        {
            base.Deserialize(node);

            Toggle = node.GetBoolChild("toggle");
            Value  = node.GetBoolChild("value");
        }
 /// <summary>
 /// Fills this object's data from a <see cref="JSONNode"/>.
 /// </summary>
 public void Deserialize(JSONNode node)
 {
     Condition   = node.GetStringChild("condition");
     IsCondition = node.GetBoolChild("is_condition");
     Next        = node.GetStringChild("next");
     Text        = node.GetObjectChild <NodeText>("text");
 }
Exemplo n.º 3
0
        /// <summary>
        /// Fills this object's data from a <see cref="JSONNode"/>.
        /// </summary>
        public override void Deserialize(JSONNode node)
        {
            base.Deserialize(node);

            JSONArray characterArrayNode = node.GetArrayChild("character");

            if (characterArrayNode != null)
            {
                Character = characterArrayNode.GetStringChild(0);
            }

            IsBox       = node.GetBoolChild("is_box");
            ObjectPath  = node.GetStringChild("object_path");
            SlideCamera = node.GetBoolChild("slide_camera");
            SpeakerType = (SpeakerType)node.GetIntChild("speaker_type");
            Text        = node.GetObjectChild <NodeText>("text");
        }
Exemplo n.º 4
0
        /// <summary>
        /// Fills this object's data from a <see cref="JSONNode"/>.
        /// </summary>
        public void Deserialize(JSONNode node)
        {
            Type = (VariableType)node.GetIntChild("type");
            switch (Type)
            {
            case VariableType.String:
                StringValue = node.GetStringChild("value");
                break;

            case VariableType.Integer:
                IntValue = node.GetIntChild("value");
                break;

            case VariableType.Bool:
                BoolValue = node.GetBoolChild("value");
                break;

            default:
                throw new NotImplementedException();
            }
        }