private static void CheckFsmGameObjectParameter(SkillGameObject fsmGameObject)
 {
     if (fsmGameObject == null)
     {
         fsmGameObject = new SkillGameObject(string.Empty);
     }
     if (fsmGameObject.get_UseVariable())
     {
         if (FsmEditorSettings.CheckForRequiredField && string.IsNullOrEmpty(fsmGameObject.get_Name()) && FsmErrorChecker.IsRequiredField())
         {
             FsmErrorChecker.AddRequiredFieldError();
             return;
         }
         FsmErrorChecker.CheckBaseGameObject(fsmGameObject.get_Value());
         return;
     }
     else
     {
         if (FsmEditorSettings.CheckForRequiredField && fsmGameObject.get_Value() == null && FsmErrorChecker.IsRequiredField())
         {
             FsmErrorChecker.AddRequiredFieldError();
             return;
         }
         FsmErrorChecker.CheckBaseGameObject(fsmGameObject.get_Value());
         return;
     }
 }
Exemplo n.º 2
0
        private static void AddCreateObjectAction()
        {
            SkillStateAction fsmStateAction = ActionUtility.AddAction(SkillEditor.SelectedState, "HutongGames.PlayMaker.Actions.CreateObject", SkillEditorMacros.droppedOnAction);
            SkillStateAction arg_32_0       = fsmStateAction;
            string           arg_32_1       = "gameObject";
            SkillGameObject  fsmGameObject  = new SkillGameObject();

            fsmGameObject.set_Value(SkillEditorMacros.droppedObject as GameObject);
            ActionUtility.SetActionFieldValue(arg_32_0, arg_32_1, fsmGameObject);
            SkillEditor.SetFsmDirty(SkillEditorMacros.droppedOnFsm, true, false, true);
            SkillEditor.SaveActions(SkillEditorMacros.droppedOnFsm);
        }
Exemplo n.º 3
0
 public static Skill GetGameObjectFSM(SkillGameObject go, SkillString fsmName)
 {
     return(null);
 }
Exemplo n.º 4
0
 public static SkillGameObject FsmGameObjectField(GUIContent label, Skill fsm, SkillGameObject fsmGameObject)
 {
     if (label == null)
     {
         label = GUIContent.none;
     }
     EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
     if (fsmGameObject.get_UseVariable())
     {
         fsmGameObject = VariableEditor.DoFsmGameObjectPopup(label, fsm, fsmGameObject);
     }
     else
     {
         fsmGameObject.set_Value((GameObject)EditorGUILayout.ObjectField(label, fsmGameObject.get_Value(), typeof(GameObject), !SkillEditor.SelectedFsmIsPersistent(), new GUILayoutOption[0]));
     }
     fsmGameObject = (SkillGameObject)VariableEditor.VariableToggle(fsmGameObject, label.get_text());
     VariableEditor.EndVariableEditor(fsmGameObject);
     return(fsmGameObject);
 }
Exemplo n.º 5
0
 public static SkillGameObject FsmGameObjectPopup(GUIContent label, Skill fsm, SkillGameObject fsmGameObject)
 {
     EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
     fsmGameObject = VariableEditor.DoFsmGameObjectPopup(label, fsm, fsmGameObject);
     VariableEditor.EndVariableEditor(fsmGameObject);
     return(fsmGameObject);
 }
Exemplo n.º 6
0
 private static SkillGameObject DoFsmGameObjectPopup(GUIContent label, Skill fsm, SkillGameObject fsmGameObject)
 {
     ActionEditor.DoVariableSelector(label, fsm, 3, fsmGameObject, -1, null);
     fsmGameObject.set_UseVariable(true);
     return(fsmGameObject);
 }