예제 #1
0
        public void deserialize(System.IO.BinaryReader br)
        {
            Parameters.Clear();
            m_scriptObjects.Clear();

            Name = br.ReadString();
            Point p = new Point();
            p.X = br.ReadDouble();
            p.Y = br.ReadDouble();
            m_isMacro = br.ReadBoolean();
            int parameterCount = br.ReadInt32();
            for (int i = 0; i < parameterCount; ++i)
            {
                Parameter param = new Parameter();
                param.deserialize(br);
                AddParameter(param);
            }
            m_offset = p;
            int goCount = br.ReadInt32();
            for (int i = 0; i < goCount; ++i)
            {
                String type = br.ReadString();
                IScriptObject so = null;
                if (type == "GameObject")
                {
                    so = new GameObject(this);
                }
                else if (type == "MacroCall")
                {
                    so = new MacroCall();
                }
                else if (type == "MacroRegistration")
                {
                    so = new MacroRegistration();
                }
                else if (type == "FunctionCall")
                {
                    so = new FunctionCall();
                }
                else if (type == "Function")
                {
                    so = new Function();
                }
                if (so != null)
                {
                    so.deserialize(br);
                    so.ParentObjectBuilder = this;
                    m_scriptObjects.Add(so);
                }
            }
        }
예제 #2
0
 public void deserialize(System.IO.BinaryReader br)
 {
     m_name = br.ReadString();
     m_type = ParameterTypeName.TypeFromString(br.ReadString());
     m_semantic = ParameterTypeName.SemanticFromString(br.ReadString());
     //if (ParentComponent is Element)
     //    m_semantic = Parameter.getParameterSemantic(ParentComponent as Element, this);
     m_values = br.ReadString();
     m_count = br.ReadInt32();
     int paramCount = br.ReadInt32();
     for (int i = 0; i < paramCount; ++i)
     {
         Parameter p = new Parameter();
         p.deserialize(br);
         p.Parent = this;
         m_subParams.Add(p);
     }
 }
예제 #3
0
 public void deserialize(System.IO.BinaryReader br)
 {
     Name = br.ReadString();
     Id = br.ReadString();
     //m_semantic = getComponentSemantic(Id);
     int paramCount = br.ReadInt32();
     for (int i = 0; i < paramCount; ++i)
     {
         Parameter newParam = new Parameter();
         newParam.Parent = DataItems.Parameter.m_defaultParameter;
         newParam.ParentComponent = this;
         newParam.deserialize(br);
         m_parameter.Add(newParam);
     }
 }