예제 #1
0
        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
        static public void SaveTestStateList()
        {
            MonsterTestManager.GetActiveInstance().SaveEntities();

            if (CurrentlyOpenTest != null)
            {
                CurrentlyOpenTest.EditorSaveMonsterTest();
            }

            MonsterTestWindow.GetInstance().SerializeBoxMetadata(true);
        }
예제 #3
0
        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);
        }
예제 #4
0
        public static MonsterTestManager SwapActiveMonsterTestManager(MonsterTest NewTest)
        {
            if (Instance != null)
            {
                Instance.UnloadTests();
            }

            Instance = new MonsterTestManager();

            EntityListFilename = NewTest.GetTestStateListFilename();
            Owner = NewTest;

            XMLSerializable.SerializeFromXML <MonsterTestManager>(NewTest.GetTestStateListFilename(), ref Instance, false);

            return(Instance);
        }
예제 #5
0
        public override void SetModifiedState(ModifiedState NewState, string VariableName)
        {
            if (NewState == ModifiedState.PreModify)
            {
            }

            base.SetModifiedState(NewState, VariableName);

            if (NewState == ModifiedState.Modified)
            {
                if (MonsterTestManager.GetActiveInstance() != null)
                {
                    MonsterTestManager.GetActiveInstance().SaveEntities();
                }
            }
        }
예제 #6
0
 public static void Log(string Message)
 {
     if (MonsterTestCore.MonsterTestCoreInst != null && MonsterTestManager.GetActiveInstance() != null)
     {
         if (IgorDebug.Logger != null)
         {
             IgorDebug.Logger.Log(MonsterTestCore.MonsterTestCoreInst, " - " + MonsterTestManager.GetActiveInstance().GetOwnerFilename() + Message);
         }
         else
         {
             Debug.Log("Igor Log: " + MonsterTestCore.MonsterTestCoreInst + " - " + MonsterTestManager.GetActiveInstance().GetOwnerFilename() + " : " + Message);
         }
     }
     else
     {
         CoreLog(Message);
     }
 }
예제 #7
0
        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();
            }
        }
예제 #8
0
        public static void CriticalError(string Message)
        {
            if (MonsterTestCore.MonsterTestCoreInst != null && MonsterTestManager.GetActiveInstance() != null)
            {
                if (IgorDebug.Logger != null)
                {
                    IgorDebug.Logger.CriticalError(MonsterTestCore.MonsterTestCoreInst, " - " + MonsterTestManager.GetActiveInstance().GetOwnerFilename() + Message);
                }
                else
                {
                    Debug.LogError("Igor Error: " + MonsterTestCore.MonsterTestCoreInst + " - " + MonsterTestManager.GetActiveInstance().GetOwnerFilename() + " : " + Message);

                    throw new UnityException(MonsterTestCore.MonsterTestCoreInst + " - " + MonsterTestManager.GetActiveInstance().GetOwnerFilename() + " : " + Message);
                }
            }
            else
            {
                CoreLog(Message);
            }
        }
예제 #9
0
 public override void SaveEntities()
 {
     MonsterTestManager.SaveTest();
 }
예제 #10
0
 public override void RemoveEntity()
 {
     MonsterTestManager.RemoveTestState(MonsterTestBaseInst);
 }
예제 #11
0
 public static void AddTestState(MonsterTestBase NewTestState)
 {
     MonsterTestManager.GetActiveInstance().AddEntity(NewTestState);
 }
예제 #12
0
 public override string GetUniqueFilename(string OriginalFilename)
 {
     return(MonsterTestManager.EditorGetUniqueTestStateFilename(OriginalFilename));
 }
예제 #13
0
 public static List <MonsterTestBase> EditorGetTestStateList()
 {
     return(MonsterTestManager.GetActiveInstance().Entities);
 }
예제 #14
0
 public static void RemoveTestState(MonsterTestBase TestStateToRemove)
 {
     MonsterTestManager.GetActiveInstance().RemoveEntity(TestStateToRemove);
 }
예제 #15
0
/*	public virtual void AddLine()
 *      {
 *              Line NewLine = new Line();
 *
 *              SetupNewLineBox(NewLine);
 *      }
 *
 *      public virtual void ConnectLine()
 *      {
 *              Line NewLine = new Line();
 *
 *              NewLine.CreateStaticNodesIfNotPresent();
 *
 *              LineBox NewBox = SetupNewLineBox(NewLine);
 *
 *              if(NewBox.GetAllAnchors().Count > 0)
 *              {
 *                      Anchor<ConversationBase> NewBoxAnchor = NewBox.GetAllAnchors()[0];
 *
 *                      ConnectInputToOutput(NewBoxAnchor, StartingAnchorForNewBox);
 *              }
 *      }
 *
 *      public virtual LineBox SetupNewLineBox(Line NewLine)
 *      {
 *              ConversationManager.AddConversation(NewLine);
 *
 *              LineBox NewBox = new LineBox(ConversationWindow.WindowInstance, NewLine);
 *
 *              NewBox.InitializeNewBox();
 *
 *              NewBox.MoveBoxTo(InputState.GetLocalMousePosition(this, -GetWindowOffset()));
 *
 *              ConversationWindow.WindowInstance.AddBox(NewBox);
 *
 *              return NewBox;
 *      }*/

        public override string GetBoxMetadataFile()
        {
            return(MonsterTestCore.MonsterLocalDirectoryRoot + "/Config/Editor/MonsterTests/MonsterTestBoxes" + MonsterTestManager.GetActiveInstance().GetOwnerFilename() + ".xml");
        }
예제 #16
0
 public override void SaveRequested()
 {
     MonsterTestManager.SaveTest();
 }
예제 #17
0
 public override void CreateStaticNodesIfNotPresent()
 {
     MonsterTestManager.GetActiveInstance().CreateStaticNodesIfNotPresent();
 }
예제 #18
0
 public static string EditorGetUniqueTestStateFilename(string OriginalFilename)
 {
     return(MonsterTestManager.GetActiveInstance().EditorGetUniqueEntityFilename(OriginalFilename));
 }
예제 #19
0
 public static void SaveTest()
 {
     MonsterTestManager.GetActiveInstance().SaveEntities();
 }
예제 #20
0
 public override LinkedEntityManager <MonsterTestBase> GetManager()
 {
     return(MonsterTestManager.GetActiveInstance());
 }
예제 #21
0
 public override MonsterTestBase GetLinkedEntityForFilename(string Filename)
 {
     return(MonsterTestManager.GetActiveInstance().GetEntityByFileName(Filename));
 }
예제 #22
0
 public virtual void UnloadTests()
 {
     Instance = null;
 }
예제 #23
0
 public static void LoadTest()
 {
     MonsterTestManager.GetActiveInstance().LoadEntities();
 }
예제 #24
0
        public override void OnInspectorGUIClickedSaveButton()
        {
            MonsterTestManager.SaveTest();

            Owner.SerializeBoxMetadata(true);
        }
예제 #25
0
 public virtual void LoadTestStates()
 {
     TestStates = MonsterTestManager.SwapActiveMonsterTestManager(this);
 }