예제 #1
0
        private void OnDisable()
        {
            string text = (this.selectedAction != null) ? this.selectedAction.get_FullName() : "";

            EditorPrefs.SetString("PlayMaker.ActionSelector.SelectedAction", text);
            EditorPrefs.SetString("PlayMaker.ActionSelector.SelectedActionCategory", this.selectedActionCategory);
            ActionSelector.instance = null;
        }
예제 #2
0
 private void AddSelectedActionAfter()
 {
     if (this.selectedAction == null || SkillEditor.SelectedState == null)
     {
         return;
     }
     SkillEditor.StateInspector.AddActionAfterSelectedAction(this.selectedAction);
     ActionSelector.FinishAddAction();
 }
예제 #3
0
        public static SkillStateAction InsertAction(SkillState state, Type actionType, SkillStateAction beforeAction)
        {
            SkillEditor.RegisterUndo(Strings.get_Command_Add_Action());
            SkillStateAction result = SkillEditor.Builder.InsertAction(SkillEditor.SelectedState, actionType, beforeAction);

            ActionSelector.AddActionToRecent(actionType);
            SkillEditor.UpdateActionUsage();
            return(result);
        }
예제 #4
0
 public override void Initialize()
 {
     ActionSelector.instance = this;
     base.set_minSize(new Vector2(200f, 200f));
     base.set_wantsMouseMove(true);
     this.isToolWindow = true;
     this.InitWindowTitle();
     this.InitSearchBox();
     Actions.BuildList();
     this.FilterActionList();
     this.NeedToFindAction();
     this.RestoreSelectedAction();
     base.Repaint();
 }
예제 #5
0
 public static void FinishAddAction()
 {
     if (ActionSelector.instance == null)
     {
         return;
     }
     ActionSelector.AddActionToRecent(ActionSelector.instance.selectedAction);
     if (FsmEditorSettings.CloseActionBrowserOnEnter)
     {
         ActionSelector.instance.Close();
         if (Event.get_current() != null)
         {
             GUIUtility.ExitGUI();
         }
     }
 }
예제 #6
0
 private static void SetRecentSize(object userdata)
 {
     FsmEditorSettings.ActionBrowserRecentSize = (int)userdata;
     FsmEditorSettings.SaveSettings();
     ActionSelector.EnforceRecentCategorySize();
 }
예제 #7
0
 public static void AddActionToRecent(Type actionType)
 {
     Actions.InsertActionAtTopOfCategory("Recent", actionType);
     ActionSelector.EnforceRecentCategorySize();
     ActionSelector.RefreshFilteredList();
 }
예제 #8
0
 public static void RemoveFromFavorites(object actionType)
 {
     Actions.RemoveActionFromCategory("Favorites", actionType as Type);
     ActionSelector.RefreshFilteredList();
 }
예제 #9
0
 public static void AddToFavorites(object actionType)
 {
     Actions.AddActionToCategory("Favorites", actionType as Type, -1);
     ActionSelector.RefreshFilteredList();
 }