コード例 #1
0
ファイル: MonsterTestWindow.cs プロジェクト: fbizuneh/Igor
        static public void ReloadTestFromFile()
        {
            if (WindowInstance != null)
            {
                WindowInstance.ClearAllBoxesAndLinks();

                if (CurrentlyOpenTest != null)
                {
                    MonsterTestManager.SwapActiveMonsterTestManager(CurrentlyOpenTest);
                }

                MonsterTestManager.LoadTest();

                WindowInstance.PreInit();

                List <MonsterTestBase> AllTestStates = MonsterTestManager.EditorGetTestStateList();

                foreach (MonsterTestBase CurrentTestState in AllTestStates)
                {
                    MonsterTestBaseBox NewBox = (MonsterTestBaseBox)TypeUtils.GetEditorBoxForTypeString(CurrentTestState.GetEntityName(), WindowInstance, CurrentTestState);
                    WindowInstance.AddBox(NewBox);
                }

                WindowInstance.PostInit();
            }
        }
コード例 #2
0
ファイル: MonsterTestWindow.cs プロジェクト: fbizuneh/Igor
        public virtual MonsterTestBaseBox SetupNewBox(string EntityTypeName, MonsterTestState NewEntity)
        {
            MonsterTestManager.AddTestState(NewEntity);

            MonsterTestBaseBox NewBox = (MonsterTestBaseBox)TypeUtils.GetEditorBoxForTypeString(EntityTypeName, MonsterTestWindow.WindowInstance, NewEntity);

            NewBox.InitializeNewBox();

            NewBox.MoveBoxTo(InputState.GetLocalMousePosition(this, -GetWindowOffset()));

            MonsterTestWindow.WindowInstance.AddBox(NewBox);

            return(NewBox);
        }
コード例 #3
0
ファイル: MonsterTestWindow.cs プロジェクト: fbizuneh/Igor
        public virtual void ConnectEntity(string EntityTypeName)
        {
            MonsterTestState NewState = (MonsterTestState)TypeUtils.GetNewObjectOfTypeString(EntityTypeName);

            NewState.CreateStaticNodesIfNotPresent();

            MonsterTestBaseBox NewBox = SetupNewBox(EntityTypeName, NewState);

            if (NewBox.GetAllAnchors().Count > 0)
            {
                Anchor <MonsterTestBase> NewBoxAnchor = NewBox.GetAllAnchors()[0];

                ConnectInputToOutput(NewBoxAnchor, StartingAnchorForNewBox);
            }
        }
コード例 #4
0
ファイル: MonsterTestWindow.cs プロジェクト: fbizuneh/Igor
        static public void FullGraphRefreshFromCurrentData()
        {
            if (WindowInstance != null)
            {
                WindowInstance.ClearAllBoxesAndLinks();

                WindowInstance.PreInit();

                List <MonsterTestBase> AllTestStates = MonsterTestManager.EditorGetTestStateList();

                foreach (MonsterTestBase CurrentTestState in AllTestStates)
                {
                    MonsterTestBaseBox NewBox = (MonsterTestBaseBox)TypeUtils.GetEditorBoxForTypeString(CurrentTestState.GetEntityName(), WindowInstance, CurrentTestState);
                    WindowInstance.AddBox(NewBox);
                }

                WindowInstance.PostInit();
            }
        }