Esempio n. 1
0
        private void Init()
        {
            if (m_keepAlive)
            {
                DontDestroyOnLoad(transform.root.gameObject);
            }

            m_fpsMonitor   = GetComponentInChildren(typeof(FpsMonitor), true) as FpsMonitor;
            m_ramMonitor   = GetComponentInChildren(typeof(RamMonitor), true) as RamMonitor;
            m_audioMonitor = GetComponentInChildren(typeof(AudioMonitor), true) as AudioMonitor;

            m_fpsManager   = GetComponentInChildren(typeof(FpsManager), true) as FpsManager;
            m_ramManager   = GetComponentInChildren(typeof(RamManager), true) as RamManager;
            m_audioManager = GetComponentInChildren(typeof(AudioManager), true) as AudioManager;
            m_advancedData = GetComponentInChildren(typeof(AdvancedData), true) as AdvancedData;

            m_fpsManager.SetPosition(m_graphModulePosition);
            m_ramManager.SetPosition(m_graphModulePosition);
            m_audioManager.SetPosition(m_graphModulePosition);
            m_advancedData.SetPosition(m_advancedModulePosition);

            m_fpsManager.SetState(m_fpsModuleState);
            m_ramManager.SetState(m_ramModuleState);
            m_audioManager.SetState(m_audioModuleState);
            m_advancedData.SetState(m_advancedModuleState);
        }
Esempio n. 2
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (DecisionData != null)
            {
                ele.TryPathTo("DecisionData", true, out subEle);
                DecisionData.WriteXML(subEle, master);
            }
            if (AdvancedData != null)
            {
                ele.TryPathTo("AdvancedData", true, out subEle);
                AdvancedData.WriteXML(subEle, master);
            }
            if (SimpleData != null)
            {
                ele.TryPathTo("SimpleData", true, out subEle);
                SimpleData.WriteXML(subEle, master);
            }
        }
Esempio n. 3
0
        public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "CSTD":
                    if (DecisionData == null)
                    {
                        DecisionData = new CombatStyleDecision();
                    }

                    DecisionData.ReadBinary(reader);
                    break;

                case "CSAD":
                    if (AdvancedData == null)
                    {
                        AdvancedData = new CombatStyleAdvanced();
                    }

                    AdvancedData.ReadBinary(reader);
                    break;

                case "CSSD":
                    if (SimpleData == null)
                    {
                        SimpleData = new CombatStyleSimple();
                    }

                    SimpleData.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Esempio n. 4
0
 public override void WriteData(ESPWriter writer)
 {
     if (EditorID != null)
     {
         EditorID.WriteBinary(writer);
     }
     if (DecisionData != null)
     {
         DecisionData.WriteBinary(writer);
     }
     if (AdvancedData != null)
     {
         AdvancedData.WriteBinary(writer);
     }
     if (SimpleData != null)
     {
         SimpleData.WriteBinary(writer);
     }
 }
Esempio n. 5
0
        public override void ReadDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (ele.TryPathTo("EditorID", false, out subEle))
            {
                if (EditorID == null)
                {
                    EditorID = new SimpleSubrecord <String>();
                }

                EditorID.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("DecisionData", false, out subEle))
            {
                if (DecisionData == null)
                {
                    DecisionData = new CombatStyleDecision();
                }

                DecisionData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("AdvancedData", false, out subEle))
            {
                if (AdvancedData == null)
                {
                    AdvancedData = new CombatStyleAdvanced();
                }

                AdvancedData.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("SimpleData", false, out subEle))
            {
                if (SimpleData == null)
                {
                    SimpleData = new CombatStyleSimple();
                }

                SimpleData.ReadXML(subEle, master);
            }
        }