Beispiel #1
0
        public static string DrawTargetPopup(ICECreatureControl _control, string _title, string _hint, string _name, string _help = "")
        {
            List <string> _targets = new List <string>();

            if (_control.Creature.Essentials.TargetReady())
            {
                _targets.Add(_control.Creature.Essentials.Target.TargetGameObject.name);
            }
            if (_control.Creature.Missions.Outpost.Enabled && _control.Creature.Missions.Outpost.TargetReady())
            {
                _targets.Add(_control.Creature.Missions.Outpost.Target.TargetGameObject.name);
            }
            if (_control.Creature.Missions.Escort.Enabled && _control.Creature.Missions.Escort.TargetReady())
            {
                _targets.Add(_control.Creature.Missions.Escort.Target.TargetGameObject.name);
            }

            if (_control.Creature.Missions.Patrol.Enabled && _control.Creature.Missions.Patrol.TargetReady())
            {
                foreach (WaypointObject _wp in _control.Creature.Missions.Patrol.Waypoints.GetValidWaypoints())
                {
                    if (_wp.TargetGameObject != null)
                    {
                        _targets.Add(_wp.TargetGameObject.name);
                    }
                }
            }

            /*
             * foreach( InteractorObject _interactor in _control.Creature.Interaction.Interactors )
             *      _targets.Add( _interactor.Name );*/


            GUIContent[] _options  = new GUIContent[_targets.Count + 1];
            int          _selected = 0;

            _options[0] = new GUIContent(" ");
            for (int i = 0; i < _targets.Count; i++)
            {
                int _index = i + 1;

                if (_targets[i] != "")
                {
                    _options[_index] = new GUIContent(_targets[i]);

                    if (_targets[i] == _name)
                    {
                        _selected = _index;
                    }
                }
                else
                {
                    _options[_index] = new GUIContent("ERROR");
                }
            }

            _selected = ICEEditorLayout.Popup(_title, _hint, _selected, _options, _help);

            return(_options[_selected].text);
        }
        public static void RenameBehaviourMode(ICECreatureControl _control, BehaviourModeObject _mode)
        {
            if (m_BehaviourRenameMode == null || m_BehaviourRenameMode != _mode)
            {
                return;
            }

            ICEEditorLayout.Label("Rename Behaviour Mode", true);
            EditorGUI.indentLevel++;
            ICEEditorLayout.BeginHorizontal();
            m_BehaviourRenameKey = EditorGUILayout.TextField("Mode Key", _control.Creature.Behaviour.GetFixedBehaviourModeKey(m_BehaviourRenameKey));

            if (ICEEditorLayout.Button("RENAME"))
            {
                if (_control.Creature.Behaviour.BehaviourModeExists(m_BehaviourRenameKey) == false)
                {
                    m_BehaviourRenameMode.Key = m_BehaviourRenameKey;
                    m_BehaviourRenameKey      = "";
                    m_BehaviourRenameMode     = null;
                }
            }

            if (ICEEditorLayout.Button("CANCEL"))
            {
                m_BehaviourRenameKey  = "";
                m_BehaviourRenameMode = null;
            }

            ICEEditorLayout.EndHorizontal(Info.BEHAVIOUR_MODE_RENAME);
            EditorGUI.indentLevel--;

            EditorGUILayout.Separator();
        }
Beispiel #3
0
        /// <summary>
        /// Draws the target influence settings.
        /// </summary>
        /// <param name="_control">Control.</param>
        /// <param name="_target">Target.</param>
        public static void DrawTargetInfluenceSettings(ICECreatureControl _control, TargetObject _target)
        {
            ICEEditorLayout.BeginHorizontal();
            EditorGUI.BeginDisabledGroup(_target.Influences.Enabled == false);
            _target.Influences.Foldout = ICEEditorLayout.Foldout(_target.Influences.Foldout, "Creature Influences", "", false);
            EditorGUI.EndDisabledGroup();

            GUILayout.FlexibleSpace();

            InteractorRuleObject _rule = _target as InteractorRuleObject;

            if (_rule != null)
            {
                _rule.OverrideInfluences = ICEEditorLayout.CheckButtonMiddle("OVERRIDE", "Overrides initial target influences", _rule.OverrideInfluences);

                _rule.Influences.Enabled = _rule.OverrideInfluences;

                if (!_rule.OverrideInfluences)
                {
                    _rule.Influences.Foldout = false;
                }
            }
            else
            {
                _target.Influences.Enabled = ICEEditorLayout.EnableButton("Enables/disables the influences", _target.Influences.Enabled);
            }

            ICEEditorLayout.EndHorizontal(Info.TARGET_INFLUENCES);

            EditorGUI.BeginDisabledGroup(_target.Influences.Enabled == false);
            CreatureObjectEditor.DrawInfluenceObject(_target.Influences, EditorHeaderType.FOLDOUT_CUSTOM, _control.Creature.Status.UseAdvanced, _control.Creature.Status.InitialDurabilityMax, Info.ENVIROMENT_COLLISION_INFLUENCES);
            EditorGUI.EndDisabledGroup();
        }
Beispiel #4
0
        private static void DrawMissionOutpost(ICECreatureControl _control)
        {
            if (_control.Display.ShowMissionsHome == false)
            {
                return;
            }

            ICEEditorStyle.SplitterByIndent(EditorGUI.indentLevel);
            _control.Display.FoldoutMissionOutpost = ICEEditorLayout.Foldout(_control.Display.FoldoutMissionOutpost, "Outpost Mission", Info.MISSION_OUTPOST);

            if (!_control.Display.FoldoutMissionOutpost)
            {
                return;
            }

            _control.Creature.Missions.Outpost.Enabled = ICEEditorLayout.Toggle("Mission Enabled", "", _control.Creature.Missions.Outpost.Enabled, Info.MISSION_ENABLED);

            EditorGUILayout.Separator();
            EditorGUI.BeginDisabledGroup(_control.Creature.Missions.Outpost.Enabled == false);
            _control.Creature.Missions.Outpost.Target = EditorSharedTools.DrawTarget(_control, _control.Creature.Missions.Outpost.Target, "Target", Info.MISSION_OUTPOST_TARGET);

            EditorGUILayout.Separator();
            EditorGUILayout.LabelField("Behaviour", ICEEditorStyle.LabelBold);
            EditorGUI.indentLevel++;
            _control.Creature.Missions.Outpost.BehaviourModeTravel     = EditorBehaviour.BehaviourSelect(_control, "Travel", "Move behaviour to reach the Outpost", _control.Creature.Missions.Outpost.BehaviourModeTravel, "TRAVEL");
            _control.Creature.Missions.Outpost.BehaviourModeRendezvous = EditorBehaviour.BehaviourSelect(_control, "Rendezvous", "Idle behaviour after reaching the current target move position.", _control.Creature.Missions.Outpost.BehaviourModeRendezvous, "RENDEZVOUS");
            EditorGUI.BeginDisabledGroup(_control.Creature.Missions.Outpost.Target.TargetRandomRange == 0);
            _control.Creature.Missions.Outpost.BehaviourModeLeisure = EditorBehaviour.BehaviourSelect(_control, "Leisure", "Randomized leisure activities around the Outpost", _control.Creature.Missions.Outpost.BehaviourModeLeisure, "STANDBY");
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
        }
        /// <summary>
        /// Creates automatically an walk behaviour rule.
        /// </summary>
        /// <param name="_control">Control.</param>
        /// <param name="_key">Key.</param>
        public static void CreateBehaviourRuleWalk(ICECreatureControl _control, BehaviourModeObject _behaviour)
        {
            if (_behaviour == null)
            {
                return;
            }

            _behaviour.NextRule();
            if (_behaviour.Rule != null)
            {
                _behaviour.Rule.Move.Enabled = true;
                _behaviour.Rule.Move.Foldout = true;
                _behaviour.Rule.Move.Motion.AngularVelocity.y = _control.Creature.Essentials.DefaultTurningSpeed;
                if (!_control.Creature.Essentials.IgnoreAnimationWalk)
                {
                    _behaviour.Rule.Move.Motion.Velocity.z = _control.Creature.Essentials.DefaultWalkingSpeed;
                    _behaviour.Rule.Animation.Copy(_control.Creature.Essentials.AnimationWalk);
                    _behaviour.Rule.Animation.Enabled = true;
                    _behaviour.Rule.Animation.Foldout = true;
                }
                else if (!_control.Creature.Essentials.IgnoreAnimationRun)
                {
                    _behaviour.Rule.Move.Motion.Velocity.z = _control.Creature.Essentials.DefaultRunningSpeed;
                    _behaviour.Rule.Animation.Copy(_control.Creature.Essentials.AnimationRun);
                    _behaviour.Rule.Animation.Enabled = true;
                    _behaviour.Rule.Animation.Foldout = true;
                }
                else
                {
                    _behaviour.Rule.Move.Motion.Velocity.z = _control.Creature.Essentials.DefaultWalkingSpeed;
                }
            }
        }
Beispiel #6
0
        private static int GetTargetsCount(ICECreatureControl _control)
        {
            int _i = 0;

            if (_control.Creature.Essentials.TargetReady())
            {
                _i++;
            }
            if (_control.Creature.Missions.Outpost.TargetReady())
            {
                _i++;
            }
            if (_control.Creature.Missions.Escort.TargetReady())
            {
                _i++;
            }
            if (_control.Creature.Missions.Patrol.TargetReady())
            {
                _i += _control.Creature.Missions.Patrol.Waypoints.GetValidWaypoints().Count;
            }

            _i += _control.Creature.Interaction.GetValidInteractors().Count;

            return(_i);
        }
        /// <summary>
        /// Creates automatically a die behaviour rule.
        /// </summary>
        /// <param name="_control">Control.</param>
        /// <param name="_key">Key.</param>
        public static void CreateBehaviourRuleDie(ICECreatureControl _control, BehaviourModeObject _behaviour)
        {
            if (_behaviour == null)
            {
                return;
            }

            _behaviour.NextRule();
            if (_behaviour.Rule != null)
            {
                _behaviour.Rule.Move.Enabled                = false;
                _behaviour.Rule.Move.Foldout                = false;
                _behaviour.Rule.Move.Motion.Velocity        = Vector3.zero;
                _behaviour.Rule.Move.Motion.AngularVelocity = Vector3.zero;
                if (!_control.Creature.Essentials.IgnoreAnimationDead)
                {
                    _behaviour.Rule.Animation.Copy(_control.Creature.Essentials.AnimationDead);
                    _behaviour.Rule.Animation.Enabled = true;
                    _behaviour.Rule.Animation.Foldout = true;
                }
                else if (!_control.Creature.Essentials.IgnoreAnimationIdle)
                {
                    _behaviour.Rule.Animation.Copy(_control.Creature.Essentials.AnimationIdle);
                    _behaviour.Rule.Animation.Enabled = true;
                    _behaviour.Rule.Animation.Foldout = true;
                }
            }
        }
Beispiel #8
0
        public void Init(GameObject gameObject)
        {
            m_Owner = gameObject;

            m_creature_control = m_Owner.GetComponent <ICECreatureControl>();
            Gizmos.Init(m_Owner);
        }
        public static AnimationDataObject WizardAnimationPopup(string _title, ICECreatureControl _control, AnimationDataObject _anim)
        {
            if (_control.GetComponentInChildren <Animator>())
            {
                _anim.InterfaceType = AnimationInterfaceType.MECANIM;
            }
            else if (_control.GetComponentInChildren <Animation>())
            {
                _anim.InterfaceType = AnimationInterfaceType.LEGACY;
            }
            else
            {
                _anim.InterfaceType = AnimationInterfaceType.NONE;
            }


            if (_anim.InterfaceType != AnimationInterfaceType.NONE)
            {
                if (_anim.InterfaceType == AnimationInterfaceType.MECANIM)
                {
                    _anim.Animator = WizardAnimationPopupMecanim(_title, _control, _anim.Animator);
                }
                else if (_anim.InterfaceType == AnimationInterfaceType.LEGACY)
                {
                    _anim.Animation = WizardAnimationPopupLegacy(_title, _control, _anim.Animation);
                }
            }
            return(_anim);
        }
        public static void Print(ICECreatureControl _control)
        {
            if (!_control.Display.ShowMissions)
            {
                return;
            }

            ICEEditorStyle.SplitterByIndent(0);
            _control.Display.FoldoutMissions = ICEEditorLayout.Foldout(_control.Display.FoldoutMissions, "Missions", Info.MISSIONS);

            if (!_control.Display.FoldoutMissions)
            {
                return;
            }

            EditorGUI.indentLevel++;

            DrawMissionOutpost(_control);
            DrawMissionEscort(_control);
            DrawMissionPatrol(_control);

            EditorGUI.indentLevel--;

            EditorGUILayout.Separator();
        }
        public static void WizardRandomTarget(ICECreatureControl _control, TargetObject _target)
        {
            string _new_target_name = (_target.Type.ToString() + "_" + _control.transform.name).ToUpper();

            GameObject _new_target_object = GameObject.Find(_new_target_name);

            if (_new_target_object == null)
            {
                _new_target_object = new GameObject();
                _new_target_object.transform.position = _control.transform.position;
                _new_target_object.name = _new_target_name;
                _new_target_object.AddComponent <ICECreatureLocation>();

                if (ICECreatureRegister.Instance != null)
                {
                    _new_target_object.transform.parent = ICECreatureRegister.Instance.HierarchyManagement.GetHierarchyGroupTransform(EntityClassType.Location);
                }
            }

            _target.OverrideTargetGameObject(_new_target_object);

            _target.Move.Enabled     = true;
            _target.Move.Foldout     = true;
            _target.Move.RandomRange = 100;            //Random.Range( Init.WIZARD_RANDOM_RANGE_MIN, Init.WIZARD_RANDOM_RANGE_MAX );
            _target.Move.UseUpdateOffsetOnActivateTarget      = true;
            _target.Move.UseUpdateOffsetOnMovePositionReached = true;
            _target.Move.StoppingDistance      = 2;
            _target.Move.IgnoreLevelDifference = true;

            if (ICECreatureRegister.Instance != null)
            {
                ICECreatureRegister.Instance.AddReference(_target.TargetGameObject);
            }
        }
Beispiel #12
0
 // Use this for initialization
 void Start()
 {
     if (NPC1 != null)
     {
         _controller_01       = NPC1.GetComponent <ICECreatureControl>();
         _controller_debug_01 = NPC1.GetComponent <ICECreatureControlDebug>();
     }
 }
        public static void WizardBehaviour(ICECreatureControl _control)
        {
            string _key = "";

            // ESSENTIAL ANIMATION BASED BEHAVIOURS
            _key = _control.Creature.Behaviour.AddBehaviourMode("RUN");
            CreateBehaviourRuleRun(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
            _control.Creature.Essentials.BehaviourModeRun    = _key;
            _control.Creature.Essentials.BehaviourModeTravel = _key;

            _key = _control.Creature.Behaviour.AddBehaviourMode("WALK");
            CreateBehaviourRuleWalk(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
            _control.Creature.Essentials.BehaviourModeWalk    = _key;
            _control.Creature.Essentials.BehaviourModeLeisure = _key;

            _key = _control.Creature.Behaviour.AddBehaviourMode("IDLE");
            CreateBehaviourRuleIdle(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
            _control.Creature.Essentials.BehaviourModeIdle       = _key;
            _control.Creature.Essentials.BehaviourModeRendezvous = _key;


            _key = _control.Creature.Behaviour.AddBehaviourMode("SPAWN");
            CreateBehaviourRuleIdle(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
            _control.Creature.Essentials.BehaviourModeSpawn = _key;

            _key = _control.Creature.Behaviour.AddBehaviourMode("DEAD");
            CreateBehaviourRuleDie(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
            _control.Creature.Essentials.BehaviourModeDead = _key;



            _key = _control.Creature.Behaviour.AddBehaviourMode("JUMP");
            CreateBehaviourRuleJump(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
            _control.Creature.Essentials.BehaviourModeJump = _key;

            _key = _control.Creature.Behaviour.AddBehaviourMode("FALL");
            CreateBehaviourRuleFall(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
            _control.Creature.Essentials.BehaviourModeFall = _key;

            // ADDITIONAL ANIMATION BASED BEHAVIOURS

            _key = _control.Creature.Behaviour.AddBehaviourMode("ATTACK");
            CreateBehaviourRuleAttack(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));

            _key = _control.Creature.Behaviour.AddBehaviourMode("DEFEND");
            CreateBehaviourRuleImpact(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));

            // ADDITIONAL BEHAVIOURS

            _key = _control.Creature.Behaviour.AddBehaviourMode("SENSE");
            CreateBehaviourRuleIdle(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));

            _key = _control.Creature.Behaviour.AddBehaviourMode("HUNT");
            CreateBehaviourRuleRun(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));

            _key = _control.Creature.Behaviour.AddBehaviourMode("ESCAPE");
            CreateBehaviourRuleRun(_control, _control.Creature.Behaviour.GetBehaviourModeByKey(_key));
        }
Beispiel #14
0
        /// <summary>
        /// Behaviours the popup.
        /// </summary>
        /// <returns>The popup.</returns>
        /// <param name="_creature_control">Creature control.</param>
        /// <param name="_title">Title.</param>
        /// <param name="_hint">Hint.</param>
        /// <param name="_key">Key.</param>
        public static string BehaviourPopup(ICECreatureControl _creature_control, string _title, string _hint, string _key, ref bool _key_exists)
        {
            string _new_key = "";

            if (_creature_control.Creature.Behaviour.BehaviourModes.Count == 0)
            {
                EditorGUILayout.LabelField(_title);
                return(_new_key);
            }
            else
            {
                GUIContent[] _options       = new GUIContent[_creature_control.Creature.Behaviour.BehaviourModes.Count + 1];
                int          _options_index = 0;

                _options[0] = new GUIContent(" ");
                for (int i = 0; i < _creature_control.Creature.Behaviour.BehaviourModes.Count; i++)
                {
                    BehaviourModeObject _mode = _creature_control.Creature.Behaviour.BehaviourModes[i];

                    int _index = i + 1;

                    _options[_index] = new GUIContent(_mode.Key);

                    if (_mode.Key == _key)
                    {
                        _options_index = _index;
                    }
                }

                if (_options_index == 0 && !string.IsNullOrEmpty(_key) && _key.Trim() != "")
                {
                    GUIContent[] _new_options       = new GUIContent[_options.Length + 1];
                    int          _new_options_index = _options.Length;

                    for (int i = 0; i < _options.Length; i++)
                    {
                        _new_options[i] = new GUIContent(_options[i].text);
                    }

                    _new_options[_new_options_index] = new GUIContent(_key);

                    GUI.backgroundColor = Color.yellow;
                    _new_options_index  = EditorGUILayout.Popup(new GUIContent(_title, _hint), _new_options_index, _new_options);
                    GUI.backgroundColor = ICEEditorLayout.DefaultBackgroundColor;

                    _new_key    = _new_options[_new_options_index].text;
                    _key_exists = false;
                }
                else
                {
                    _options_index = EditorGUILayout.Popup(new GUIContent(_title, _hint), _options_index, _options);
                    _new_key       = _options[_options_index].text;
                    _key_exists    = true;
                }
            }

            return(_new_key);
        }
Beispiel #15
0
        private static InteractorObject DrawInteractorOffset(ICECreatureControl _control, InteractorObject _interactor)
        {
            TargetObject _target = new TargetObject(TargetType.INTERACTOR);

            _target.TargetGameObject = m_creature_register.GetReferenceCreatureByName(_interactor.Name);

            ICEEditorLayout.BeginHorizontal();
            _interactor.Name = EditorSharedTools.RegisterPopup("Target Object", _interactor.Name);
            if (_target.TargetGameObject != null)
            {
                if (GUILayout.Button("SHOW", ICEEditorStyle.ButtonMiddle))
                {
                    var view = SceneView.currentDrawingSceneView;
                    if (view != null)
                    {
                        Vector3 _pos = _target.TargetGameObject.transform.position;

                        _pos.y       += 20;
                        view.rotation = new Quaternion(1, 0, 0, 1);
                        view.LookAt(_pos);

                        //	view.AlignViewToObject(_target.TargetGameObject.transform);
                    }
                }

                if (GUILayout.Button("SELECT", ICEEditorStyle.ButtonMiddle))
                {
                    Selection.activeGameObject = _target.TargetGameObject;
                }
            }
            ICEEditorLayout.EndHorizontal(Info.INTERACTION_INTERACTOR_TARGET);


            _target.UpdateOffset(_interactor.DefaultOffset);
            _target.TargetStopDistance = _interactor.DefaultStopDistance;
            _target.TargetRandomRange  = _interactor.DefaultRandomRange;
            _target.UseUpdateOffsetOnActivateTarget      = _interactor.UpdateOffsetOnActivateTarget;
            _target.UseUpdateOffsetOnMovePositionReached = _interactor.UpdateOffsetOnMovePositionReached;
            _target.TargetSmoothingMultiplier            = _interactor.DefaultSmoothingMultiplier;
            _target.TargetIgnoreLevelDifference          = _interactor.DefaultIgnoreLevelDifference;

            _target = EditorSharedTools.DrawTargetOffset(_control, _target);

            _interactor.DefaultOffset                     = _target.TargetOffset;
            _interactor.DefaultStopDistance               = _target.TargetStopDistance;
            _interactor.DefaultRandomRange                = _target.TargetRandomRange;
            _interactor.UpdateOffsetOnActivateTarget      = _target.UseUpdateOffsetOnActivateTarget;
            _interactor.UpdateOffsetOnMovePositionReached = _target.UseUpdateOffsetOnMovePositionReached;
            _interactor.DefaultIgnoreLevelDifference      = _target.TargetIgnoreLevelDifference;

            _interactor.DefaultSmoothingMultiplier = _target.TargetSmoothingMultiplier;

            _target.TargetGameObject = null;
            _target = null;

            return(_interactor);
        }
Beispiel #16
0
        //public GameObject NPC2;
        // Use this for initialization
        void Start()
        {
            if (NPC1 == null)
            {
                return;
            }

            _controller_01 = NPC1.GetComponent <ICECreatureControl>();
        }
Beispiel #17
0
        protected override void Awake()
        {
            m_Controller = GetComponent <ICECreatureControl>();

            if (UseTPCHealth)
            {
                base.Awake();
            }
        }
Beispiel #18
0
        public void Stop(ICEWorldBehaviour _component)
        {
            ICECreatureControl _control = _component as ICECreatureControl;

            if (base.Stop() && _control != null)
            {
                _control.Creature.UpdateStatusInfluences(this);
            }
        }
Beispiel #19
0
        /// <summary>
        /// Draws the target.
        /// </summary>
        /// <returns>The target.</returns>
        /// <param name="m_creature_control">M_creature_control.</param>
        /// <param name="_target">_target.</param>
        /// <param name="_help">_help.</param>
        public static TargetObject DrawTarget(ICECreatureControl _control, TargetObject _target, string _title, string _help = "")
        {
            EditorGUILayout.Separator();
            ICEEditorLayout.Label(_title, true, _help);
            EditorGUI.indentLevel++;


            DrawTargetSelectors(_control, _target.Selectors, _target.Type, Init.SELECTION_RANGE_MIN, Init.SELECTION_RANGE_MAX);
            ICEEditorLayout.BeginHorizontal();

            _target.IsPrefab = false;
            if (PrefabUtility.GetPrefabParent(_target.TargetGameObject) == null && PrefabUtility.GetPrefabObject(_target.TargetGameObject) != null)                          // Is a prefab
            {
                _target.IsPrefab = true;
            }

            if (_target.TargetGameObject == null)
            {
                GUI.backgroundColor = Color.red;
            }

            _target.TargetGameObject = (GameObject)EditorGUILayout.ObjectField("Target Object " + (_target.IsValid?(_target.IsPrefab?"(prefab)":"(scene)"):"(null)"), _target.TargetGameObject, typeof(GameObject), true);

            GUI.backgroundColor = ICEEditorLayout.DefaultBackgroundColor;

            if (_target.TargetGameObject != null)
            {
                if (GUILayout.Button("SHOW", ICEEditorStyle.ButtonMiddle))
                {
                    var view = SceneView.currentDrawingSceneView;
                    if (view != null)
                    {
                        Vector3 _pos = _target.TargetGameObject.transform.position;

                        _pos.y       += 20;
                        view.rotation = new Quaternion(1, 0, 0, 1);
                        view.LookAt(_pos);

                        //	view.AlignViewToObject(_target.TargetGameObject.transform);
                    }
                }

                if (GUILayout.Button("SELECT", ICEEditorStyle.ButtonMiddle))
                {
                    Selection.activeGameObject = _target.TargetGameObject;
                }
            }

            ICEEditorLayout.EndHorizontal(Info.TARGET_OBJECT);

            EditorGUI.BeginDisabledGroup(_target.TargetGameObject == null);
            _target = DrawTargetOffset(_control, _target);
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;
            return(_target);
        }
Beispiel #20
0
        public static void DrawTargetBehaviour(ICECreatureControl _control, TargetObject _target, string _default_key = "", params string[] _params)
        {
            if (_target == null)
            {
                return;
            }

            string _title = "Creature Behaviour " + _target.Behaviour.BehaviourTitleSuffix();
            string _hint  = "";
            string _help  = Info.TARGET_BEHAVIOUR;

            ICEEditorLayout.BeginHorizontal();

            _target.Behaviour.Foldout = ICEEditorLayout.Foldout(_target.Behaviour.Foldout, _title, _hint, false);

            EditorGUI.BeginDisabledGroup(_target.Behaviour.UseSelectiveBehaviour == true);
            _target.Behaviour.UseAdvancedBehaviour = ICEEditorLayout.CheckButtonSmall("ADV", "Allows advanced behaviour settings", _target.Behaviour.UseAdvancedBehaviour);
            EditorGUI.EndDisabledGroup();

            _target.Behaviour.UseSelectiveBehaviour = ICEEditorLayout.CheckButtonSmall("SEL", "Allows selective behaviour settings", _target.Behaviour.UseSelectiveBehaviour);

            ICEEditorLayout.EndHorizontal(_help);

            if (!_target.Behaviour.Foldout)
            {
                return;
            }

            EditorGUI.indentLevel++;

            if (_target.Behaviour.UseSelectiveBehaviour)
            {
                EditorGUILayout.HelpBox("Sorry, this feature is unfortunately not available in the current version!", MessageType.Info);
            }
            else if (_target.Behaviour.UseAdvancedBehaviour)
            {
                string _title_1 = (_params.Length > 1 ?_params[1] : "Standard");
                string _title_2 = (_params.Length > 2 ?_params[2] : "Rendezvous");

                string _default_key_1 = _default_key + "_TS_" + (_params.Length > 1 ?_params[1] : "Standard") + "_" + _target.TargetName;
                string _default_key_2 = _default_key + "_TR_" + (_params.Length > 2 ?_params[2] : "Rendezvous") + "_" + _target.TargetName;

                _target.Behaviour.BehaviourModeKey        = BehaviourEditor.BehaviourSelect(_control, _title_1, "Move behaviour while approching or avoiding the target", _target.Behaviour.BehaviourModeKey, _default_key_1.ToUpper(), Info.TARGET_BEHAVIOUR_STANDARD);
                _target.Behaviour.BehaviourModeKeyReached = BehaviourEditor.BehaviourSelect(_control, _title_2, "Rendezvous behaviour while the final move position of the target was reached", _target.Behaviour.BehaviourModeKeyReached, _default_key_2.ToUpper(), Info.TARGET_BEHAVIOUR_RENDEZVOUS);
            }
            else
            {
                string _title_0 = (_params.Length > 0 ?_params[0]: "Standard");

                string _default_key_1 = _default_key + "_TS_" + (_params.Length > 1 ?_params[1] : "Standard") + "_" + _target.TargetName;

                _target.Behaviour.BehaviourModeKey = BehaviourEditor.BehaviourSelect(_control, _title_0, "Behaviour while the target is active.", _target.Behaviour.BehaviourModeKey, _default_key_1.ToUpper(), Info.TARGET_BEHAVIOUR_STANDARD);
            }

            EditorGUI.indentLevel--;
        }
Beispiel #21
0
 /// <summary>
 /// Draws the target.
 /// </summary>
 /// <param name="_control">Control.</param>
 /// <param name="_target">Target.</param>
 /// <param name="_title">Title.</param>
 /// <param name="_help">Help.</param>
 public static void DrawMissionTarget(ICECreatureControl _control, TargetObject _target, string _title, string _help = "")
 {
     _target.Foldout = ICEEditorLayout.Foldout(_target.Foldout, _title, ref _target.ShowInfoText, ref _target.InfoText, _help, true);
     if (_target.Foldout)
     {
         DrawTargetObject(_control, _target, "", "");
         DrawTargetContent(_control, _target, false);
         EditorGUILayout.Separator();
     }
 }
Beispiel #22
0
        private static int GetBehaviorModeRulesCount(ICECreatureControl _control)
        {
            int _i = 0;

            foreach (BehaviourModeObject _mode in _control.Creature.Behaviour.BehaviourModes)
            {
                _i += _mode.Rules.Count;
            }
            return(_i);
        }
Beispiel #23
0
        /// <summary>
        /// Draws the target.
        /// </summary>
        /// <returns>The target.</returns>
        /// <param name="m_creature_control">M_creature_control.</param>
        /// <param name="_target">_target.</param>
        /// <param name="_help">_help.</param>
        public static TargetObject DrawTargetOffset(ICECreatureControl _control, TargetObject _target)
        {
            //ICEEditorLayout.Label( "TargetMovePosition Specifications", false, Info.TARGET_MOVE_SPECIFICATIONS );

            EditorGUI.indentLevel++;
            Vector3 _offset = ICEEditorLayout.OffsetGroup("Offset", _target.TargetOffset, _control.gameObject, _target.TargetGameObject, 0.5f, 25, Info.TARGET_MOVE_SPECIFICATIONS_OFFSET);

            if (_offset != _target.TargetOffset || (_offset != Vector3.zero && _target.OffsetDistance == 0) || (_offset == Vector3.zero && _target.OffsetDistance != 0))
            {
                _target.UpdateOffset(_offset);
            }

            EditorGUI.indentLevel++;

            float _distance = ICEEditorLayout.DefaultSlider("Distance", "", _target.OffsetDistance, Init.TARGET_OFFSET_DISTANCE_STEP, Init.TARGET_OFFSET_DISTANCE_MIN, Init.TARGET_OFFSET_DISTANCE_MAX, Init.TARGET_OFFSET_DISTANCE_DEFAULT, Info.TARGET_MOVE_SPECIFICATIONS_OFFSET_DISTANCE);

            EditorGUI.BeginDisabledGroup(_distance == 0);
            float _angle = ICEEditorLayout.DefaultSlider("Angle", "", _target.OffsetAngle, 1, 0, 360, 0, Info.TARGET_MOVE_SPECIFICATIONS_OFFSET_ANGLE);

            if (_distance != _target.OffsetDistance || _angle != _target.OffsetAngle)
            {
                _target.UpdateOffset(_angle, _distance);
            }
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;

            EditorGUILayout.Separator();
            _target.UpdateRandomRange(ICEEditorLayout.DefaultSlider("Random Positioning Range", "", _target.TargetRandomRange, Init.TARGET_RANDOM_RANGE_STEP, Init.TARGET_RANDOM_RANGE_MIN, Init.TARGET_RANDOM_RANGE_MAX, Init.TARGET_RANDOM_RANGE_DEFAULT, Info.TARGET_MOVE_SPECIFICATIONS_RANDOM_RANGE));

            EditorGUI.BeginDisabledGroup(_target.TargetRandomRange == 0);
            EditorGUI.indentLevel++;
            _target.UseUpdateOffsetOnActivateTarget      = ICEEditorLayout.Toggle("Update on activate", "", _target.UseUpdateOffsetOnActivateTarget, Info.TARGET_MOVE_SPECIFICATIONS_OFFSET_UPDATE_ACTIVATE);
            _target.UseUpdateOffsetOnMovePositionReached = ICEEditorLayout.Toggle("Update on reached", "", _target.UseUpdateOffsetOnMovePositionReached, Info.TARGET_MOVE_SPECIFICATIONS_OFFSET_UPDATE_REACHED);
            _target.UseUpdateOffsetOnRandomizedTimer     = ICEEditorLayout.Toggle("Update on timer", "", _target.UseUpdateOffsetOnRandomizedTimer, Info.TARGET_MOVE_SPECIFICATIONS_OFFSET_UPDATE_TIMER);
            EditorGUI.BeginDisabledGroup(_target.UseUpdateOffsetOnRandomizedTimer == false);
            EditorGUI.indentLevel++;
            _target.OffsetUpdateTimeMin = ICEEditorLayout.DefaultSlider("Min. Interval", "", _target.OffsetUpdateTimeMin, 0.25f, 0, 360, 5);
            _target.OffsetUpdateTimeMax = ICEEditorLayout.DefaultSlider("Max. Interval", "", _target.OffsetUpdateTimeMax, 0.25f, 0, 360, 30);
            EditorGUI.indentLevel--;
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            _target.TargetSmoothingMultiplier = ICEEditorLayout.DefaultSlider("Smoothing", "Smoothing affects step-size and update speed of the TargetMovePosition.", _target.TargetSmoothingMultiplier, 0.01f, 0, 1, 0.5f, Info.TARGET_MOVE_SPECIFICATIONS_SMOOTHING);
            _target.TargetStopDistance        = ICEEditorLayout.DefaultSlider("Stopping Distance (" + (_target.TargetIgnoreLevelDifference?"circular":"spherical") + ")", "Stop within this distance from the target move position.", _target.TargetStopDistance, Init.TARGET_STOP_DISTANCE_STEP, Init.TARGET_STOP_MIN_DISTANCE, Init.TARGET_STOP_MAX_DISTANCE, Init.TARGET_STOP_DISTANCE_DEFAULT, Info.TARGET_MOVE_SPECIFICATIONS_STOP_DISTANCE);
            EditorGUI.indentLevel++;
            _target.TargetIgnoreLevelDifference = ICEEditorLayout.InfoToggle("Ignore Level Differences", "Provides linear distances without consideration of level differences.", _target.TargetIgnoreLevelDifference, Info.TARGET_MOVE_SPECIFICATIONS_IGNORE_LEVEL_DIFFERENCE);
            EditorGUI.indentLevel--;


            EditorGUI.indentLevel--;

            return(_target);
        }
Beispiel #24
0
        private static void DrawMissionEscort(ICECreatureControl _control)
        {
            if (_control.Display.ShowMissionsEscort == false)
            {
                return;
            }

            ICEEditorStyle.SplitterByIndent(EditorGUI.indentLevel);
            ICEEditorLayout.BeginHorizontal();
            _control.Display.FoldoutMissionEscort = ICEEditorLayout.Foldout(_control.Display.FoldoutMissionEscort, "Escort Mission");
            if (GUILayout.Button("SAVE", ICEEditorStyle.ButtonMiddle))
            {
                CreatureIO.SaveMissionEscortToFile(_control.Creature.Missions.Escort, _control.gameObject.name);
            }
            if (GUILayout.Button("LOAD", ICEEditorStyle.ButtonMiddle))
            {
                _control.Creature.Missions.Escort = CreatureIO.LoadMissionEscortFromFile(_control.Creature.Missions.Escort);
            }
            ICEEditorLayout.EndHorizontal(Info.MISSION_ESCORT);

            if (!_control.Display.FoldoutMissionEscort)
            {
                return;
            }

            _control.Creature.Missions.Escort.Enabled = ICEEditorLayout.Toggle("Mission Enabled", "", _control.Creature.Missions.Escort.Enabled, Info.MISSION_ENABLED);
            EditorGUILayout.Separator();
            EditorGUI.BeginDisabledGroup(_control.Creature.Missions.Escort.Enabled == false);

            _control.Creature.Missions.Escort.Target = EditorSharedTools.DrawTarget(_control, _control.Creature.Missions.Escort.Target, "Target", Info.MISSION_ESCORT_TARGET);

            EditorGUILayout.Separator();

            ICEEditorLayout.Label("Behaviour", true, Info.MISSION_ESCORT_BEHAVIOUR);

            EditorGUI.indentLevel++;

            _control.Creature.Missions.Escort.BehaviourModeFollow  = EditorBehaviour.BehaviourSelect(_control, "Follow", "Move behaviour to follow and reach the leader", _control.Creature.Missions.Escort.BehaviourModeFollow, "FOLLOW");
            _control.Creature.Missions.Escort.BehaviourModeEscort  = EditorBehaviour.BehaviourSelect(_control, "Escort", "Move behaviour to escort the leader", _control.Creature.Missions.Escort.BehaviourModeEscort, "ESCORT");
            _control.Creature.Missions.Escort.BehaviourModeStandby = EditorBehaviour.BehaviourSelect(_control, "Standby", "Idle behaviour if the leader stops", _control.Creature.Missions.Escort.BehaviourModeStandby, "STANDBY");

            EditorGUI.indentLevel++;

            _control.Creature.Missions.Escort.DurationStandby = ICEEditorLayout.Slider("Duration (until IDLE)", "", _control.Creature.Missions.Escort.DurationStandby, 1, 0, 60);

            EditorGUI.indentLevel--;

            _control.Creature.Missions.Escort.BehaviourModeIdle = EditorBehaviour.BehaviourSelect(_control, "Idle", "Idle behaviour if the leader breaks for a longer time-span", _control.Creature.Missions.Escort.BehaviourModeIdle, "IDLE");

            EditorGUI.indentLevel--;

            EditorGUILayout.Separator();

            EditorGUI.EndDisabledGroup();
        }
Beispiel #25
0
        public static void DrawTargetSelector(ICECreatureControl _control, TargetSelectorConditionObject _selector)
        {
            if (_selector == null)
            {
                return;
            }

            ICEEditorLayout.BeginHorizontal();

            ICEEditorLayout.EndHorizontal();
        }
        /// <summary>
        /// Draws the length of the behaviour custom.
        /// </summary>
        /// <returns>The behaviour custom length.</returns>
        /// <param name="_rule">Rule.</param>
        private static void DrawBehaviourCustomLength(ICECreatureControl _control, BehaviourModeRuleObject _rule, EditorHeaderType _type, string _help = "", string _title = "", string _hint = "")
        {
            if (_rule == null)
            {
                return;
            }

            if (string.IsNullOrEmpty(_title))
            {
                _title = "Rule Length";
            }
            if (string.IsNullOrEmpty(_hint))
            {
                _hint = "";
            }
            if (string.IsNullOrEmpty(_help))
            {
                _help = Info.BEHAVIOUR_LENGTH;
            }

            ICEEditorLayout.BeginHorizontal();
            CreatureObjectEditor.DrawObjectHeaderLine(ref _rule.UseCustomLength, ref _rule.FoldoutCustomLength, _type, _title, _hint);
            ICEEditorLayout.EndHorizontal(_help);

            if (_rule.UseCustomLength && _rule.FoldoutCustomLength)
            {
                EditorGUI.indentLevel++;

                ICEEditorLayout.BeginHorizontal();
                ICEEditorLayout.MinMaxSlider("Min/Max Length (secs.)", "Enter the desired Play-Length or press 'RND' to set randomized values.", ref _rule.LengthMin, ref _rule.LengthMax, 0, ref _rule.LengthMaximum, 0.25f, 35);
                if (ICEEditorLayout.RandomButton(""))
                {
                    _rule.LengthMax = Random.Range(_rule.LengthMin, _rule.LengthMaximum);
                    _rule.LengthMin = Random.Range(0, _rule.LengthMax);
                }

                if (ICEEditorLayout.ButtonSmall("ANIM", ""))
                {
                    _rule.LengthMin = _rule.Animation.GetAnimationLength();
                    _rule.LengthMax = _rule.LengthMin;
                }

                if (ICEEditorLayout.ResetButtonSmall(""))
                {
                    _rule.LengthMin = 0;
                    _rule.LengthMax = 0;
                }
                ICEEditorLayout.EndHorizontal(Info.BEHAVIOUR_LENGTH);

                EditorGUI.indentLevel--;
                EditorGUILayout.Separator();
            }
        }
        /// <summary>
        /// Draws the content of the behaviour mode.
        /// </summary>
        /// <param name="_control">Control.</param>
        /// <param name="_mode">Mode.</param>
        public static void DrawBehaviourModeContent(ICECreatureControl _control, BehaviourModeObject _mode)
        {
            if (_mode == null)
            {
                return;
            }

            EditorHeaderType _header = EditorHeaderType.FOLDOUT_ENABLED_BOLD;

            EditorGUI.indentLevel++;
            CreatureObjectEditor.DrawBehaviourModeFavouredObject(_control, _mode.Favoured, _header, Info.BEHAVIOUR_MODE_FAVOURED);
            EditorGUI.indentLevel--;

            if (_mode.Rules.Count > 1)
            {
                ICEEditorLayout.Label("Rules", true, Info.BEHAVIOUR_MODE_RULE);
                EditorGUI.indentLevel++;
                ICEEditorLayout.BeginHorizontal();
                _mode.RulesOrderType = (SequenceOrderType)ICEEditorLayout.EnumPopup("Order Type", "", _mode.RulesOrderType);
                EditorGUI.BeginDisabledGroup(_mode.RulesOrderType != SequenceOrderType.CYCLE);
                _mode.RulesOrderInverse = ICEEditorLayout.CheckButtonMiddle("INVERSE", "", _mode.RulesOrderInverse);
                EditorGUI.EndDisabledGroup();
                ICEEditorLayout.EndHorizontal(Info.BEHAVIOUR_MODE_RULES_ORDER);
                EditorGUI.indentLevel--;
            }

            for (int i = 0; i < _mode.Rules.Count; i++)
            {
                DrawBehaviourModeRule(_control, _mode, i, _mode.Rules, _mode.Key);
            }

            if (_mode.Rules.Count == 1)
            {
                ICEEditorStyle.SplitterByIndent(EditorGUI.indentLevel + 1);
                ICEEditorLayout.BeginHorizontal();
                EditorGUILayout.LabelField("Add or Copy Behaviour Rule", EditorStyles.miniLabel);
                if (ICEEditorLayout.AddButton("Add Behaviour Rule"))
                {
                    _mode.Rules.Add(new BehaviourModeRuleObject());
                }
                if (ICEEditorLayout.CopyButtonMiddle("Copy Behaviour Rule"))
                {
                    _mode.Rules.Add(new BehaviourModeRuleObject(_mode.Rules[0]));
                }
                ICEEditorLayout.EndHorizontal("Add or Copy Behaviour Rule");
            }
            else
            {
                ICEEditorLayout.DrawListAddLine <BehaviourModeRuleObject>(_mode.Rules, new BehaviourModeRuleObject(), true, "Add Behaviour Rule", Info.BEHAVIOUR_MODE_RULE_ADD);
            }

            //EditorGUILayout.Separator();
        }
        private static void DrawMissionOutpost(ICECreatureControl _control)
        {
            ICEEditorStyle.SplitterByIndent(EditorGUI.indentLevel);

            //HEADER BEGIN
            ICEEditorLayout.BeginHorizontal();
            _control.Creature.Missions.Outpost.Foldout = ICEEditorLayout.Foldout(_control.Creature.Missions.Outpost.Foldout, "Outpost Mission");

            if (ICEEditorLayout.SaveButton())
            {
                CreatureEditorIO.SaveMissionOutpostToFile(_control.Creature.Missions.Outpost, _control.gameObject.name);
            }
            if (ICEEditorLayout.LoadButton())
            {
                _control.Creature.Missions.Outpost = CreatureEditorIO.LoadMissionOutpostFromFile(_control.Creature.Missions.Outpost);
            }
            if (ICEEditorLayout.ResetButton())
            {
                _control.Creature.Missions.Outpost = new OutpostObject();
            }

            _control.Creature.Missions.Outpost.Enabled = ICEEditorLayout.EnableButton(_control.Creature.Missions.Outpost.Enabled);
            ICEEditorLayout.EndHorizontal(Info.MISSION_OUTPOST);
            //HEADER END

            if (!_control.Creature.Missions.Outpost.Foldout)
            {
                return;
            }

            EditorGUI.BeginDisabledGroup(_control.Creature.Missions.Outpost.Enabled == false);
            EditorGUI.indentLevel++;
            TargetEditor.DrawMissionTarget(_control, _control.Creature.Missions.Outpost.Target, "Target", Info.MISSION_OUTPOST_TARGET);

            EditorGUI.BeginDisabledGroup(_control.Creature.Missions.Outpost.Target.TargetGameObject == null);
            _control.Creature.Missions.Outpost.BehaviourFoldout = ICEEditorLayout.Foldout(_control.Creature.Missions.Outpost.BehaviourFoldout, "Behaviour", Info.MISSION_OUTPOST_BEHAVIOR, true);
            if (_control.Creature.Missions.Outpost.BehaviourFoldout)
            {
                _control.Creature.Missions.Outpost.BehaviourModeTravel     = BehaviourEditor.BehaviourSelect(_control, "Travel", "Move behaviour to reach the Outpost", _control.Creature.Missions.Outpost.BehaviourModeTravel, "OUTPOST_TRAVEL");
                _control.Creature.Missions.Outpost.BehaviourModeRendezvous = BehaviourEditor.BehaviourSelect(_control, "Rendezvous", "Idle behaviour after reaching the current target move position.", _control.Creature.Missions.Outpost.BehaviourModeRendezvous, "OUTPOST_RENDEZVOUS");
                if (_control.Creature.Missions.Outpost.Target.Move.HasRandomRange)
                {
                    _control.Creature.Missions.Outpost.BehaviourModeLeisure = BehaviourEditor.BehaviourSelect(_control, "Leisure", "Randomized leisure activities around the Outpost", _control.Creature.Missions.Outpost.BehaviourModeLeisure, "OUTPOST_LEISURE");
                }
            }
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;
            EditorGUI.EndDisabledGroup();


            EditorGUILayout.Separator();
        }
Beispiel #29
0
 public bool IsActive(ICECreatureControl _control)
 {
     if (DamageBehaviourModeKey != "" &&
         _control.Creature.Behaviour.ActiveBehaviourModeKey == DamageBehaviourModeKey &&
         _control.Creature.ActiveTargetMovePositionDistance <= Range)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
        private static void DrawMissionEscort(ICECreatureControl _control)
        {
            ICEEditorStyle.SplitterByIndent(EditorGUI.indentLevel);

            //HEADER BEGIN
            ICEEditorLayout.BeginHorizontal();
            _control.Creature.Missions.Escort.Foldout = ICEEditorLayout.Foldout(_control.Creature.Missions.Escort.Foldout, "Escort Mission");

            if (ICEEditorLayout.SaveButton())
            {
                CreatureEditorIO.SaveMissionEscortToFile(_control.Creature.Missions.Escort, _control.gameObject.name);
            }
            if (ICEEditorLayout.LoadButton())
            {
                _control.Creature.Missions.Escort = CreatureEditorIO.LoadMissionEscortFromFile(_control.Creature.Missions.Escort);
            }
            if (ICEEditorLayout.ResetButton())
            {
                _control.Creature.Missions.Escort = new EscortObject();
            }

            _control.Creature.Missions.Escort.Enabled = ICEEditorLayout.EnableButton(_control.Creature.Missions.Escort.Enabled);
            ICEEditorLayout.EndHorizontal(Info.MISSION_ESCORT);
            //HEADER END

            if (!_control.Creature.Missions.Escort.Foldout)
            {
                return;
            }

            EditorGUI.BeginDisabledGroup(_control.Creature.Missions.Escort.Enabled == false);
            EditorGUI.indentLevel++;
            TargetEditor.DrawMissionTarget(_control, _control.Creature.Missions.Escort.Target, "Target", Info.MISSION_ESCORT_TARGET);

            EditorGUI.BeginDisabledGroup(_control.Creature.Missions.Escort.Target.TargetGameObject == null);
            _control.Creature.Missions.Escort.BehaviourFoldout = ICEEditorLayout.Foldout(_control.Creature.Missions.Escort.BehaviourFoldout, "Behaviour", Info.MISSION_ESCORT_BEHAVIOUR, true);
            if (_control.Creature.Missions.Escort.BehaviourFoldout)
            {
                _control.Creature.Missions.Escort.BehaviourModeFollow  = BehaviourEditor.BehaviourSelect(_control, "Follow", "Move behaviour to follow and reach the leader", _control.Creature.Missions.Escort.BehaviourModeFollow, "ESCORT_FOLLOW");
                _control.Creature.Missions.Escort.BehaviourModeEscort  = BehaviourEditor.BehaviourSelect(_control, "Escort", "Move behaviour to escort the leader", _control.Creature.Missions.Escort.BehaviourModeEscort, "ESCORT");
                _control.Creature.Missions.Escort.BehaviourModeStandby = BehaviourEditor.BehaviourSelect(_control, "Standby", "Idle behaviour if the leader stops", _control.Creature.Missions.Escort.BehaviourModeStandby, "ESCORT_STANDBY");
                EditorGUI.indentLevel++;
                _control.Creature.Missions.Escort.DurationStandby = ICEEditorLayout.Slider("Duration (until IDLE)", "", _control.Creature.Missions.Escort.DurationStandby, 1, 0, 60);
                EditorGUI.indentLevel--;
                _control.Creature.Missions.Escort.BehaviourModeIdle = BehaviourEditor.BehaviourSelect(_control, "Idle", "Idle behaviour if the leader breaks for a longer time-span", _control.Creature.Missions.Escort.BehaviourModeIdle, "ESCORT_IDLE");
            }
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;
            EditorGUI.EndDisabledGroup();
            EditorGUILayout.Separator();
        }