コード例 #1
0
 private void Load()
 {
     if (File.Exists(mFileName))
     {
         mUserClassDefinitions = BaseLoader <UserClassDefinitions> .Load(mFileName);
     }
 }
コード例 #2
0
        public HintDatabasePage()
        {
            InitializeComponent();

            //load db
            mFilename = CoreGlobals.getWorkPaths().mGameDataDirectory + "\\concepts.xml";
            if (File.Exists(mFilename))
            {
                mDatabase = BaseLoader <ProtoConceptDatabase> .Load(mFilename);
            }

            mConceptEditor = propertyList1;
            //set metadata
            //mConceptEditor.SetTypeEditor("ProtoConcept", "MessageStringID", typeof(LocStringIDProperty));
            //mConceptEditor.AddMetaDataForProps("ProtoConcept", new string[] { "MessageStringID" }, "Compact", true);
            mConceptEditor.SetTypeEditor("ProtoConcept", "Prerequisites", typeof(TriggerPropConceptList2));
            mConceptEditor.AddMetaDataForProp("ProtoConcept", "Prerequisites", "StringIntSource", GetConceptEnumeration());
            mConceptEditor.AddMetaDataForProp("ProtoConcept", "Prerequisites", "AllowRepeats", false);
            mConceptEditor.AddMetaDataForProp("ProtoConcept", "Prerequisites", "AutoSort", true);

            mConceptEditor.AnyPropertyChanged += new ObjectEditorControl.PropertyChanged(mConceptEditor_AnyPropertyChanged);


            LoadUI();
        }
コード例 #3
0
        //public void SetUserClasses(List<UserClassDefinition> userClasses)
        //{
        //   mUserClassDefinitions = userClasses;// new List<UserClassDefinition>();
        //   LoadUI();
        //}
        private void Load()
        {
            if (File.Exists(mFileName))
            {
                mUserClassDefinitions = BaseLoader <UserClassDefinitions> .Load(mFileName);

                TriggerSystemMain.mTriggerDefinitions.mUserClassDefinitions = mUserClassDefinitions;
                LoadUI();
            }
            else
            {
                mUserClassDefinitions = new UserClassDefinitions();
            }
        }
コード例 #4
0
            public void Load(AtlasPage page, string path)
            {
                var frameNode = this.TopNode.FindNodeByPath(path);

                if (frameNode == null || frameNode.Value == null)
                {
                    return;
                }

                //处理uol
                while (frameNode.Value is Wz_Uol)
                {
                    frameNode = ((Wz_Uol)frameNode.Value).HandleUol(frameNode);
                }
                //寻找link
                var linkNode = frameNode.GetLinkedSourceNode(PluginManager.FindWz);
                //加载资源
                var texture = BaseLoader.Load <Texture2D>(linkNode);

                page.rendererObject = texture;
                page.width          = texture.Width;
                page.height         = texture.Height;
            }