Exemplo n.º 1
0
        private void EnsureFormationMode()
        {
            if (MiniGrouperScript == null)
            {
                return;
            }

            changingInternally = true;
            try
            {
                rbFormation.Checked = true;
            }
            finally
            {
                changingInternally = false;
            }

            if (MiniGrouperScript.Data.Movement == GroupMovementMode.Formation)
            {
                return;
            }

            MiniGrouperScript.Data.Movement = GroupMovementMode.Formation;
            MiniGrouperScript.DataChanged();
        }
Exemplo n.º 2
0
        void UpdateLookSettings()
        {
            if (changingInternally || MiniGrouperScript == null)
            {
                return;
            }

            if (rbLookTowardLeader.Checked)
            {
                MiniGrouperScript.Data.Look = LookTowardMode.Leader;
            }
            else if (rbLookTowardMovement.Checked)
            {
                MiniGrouperScript.Data.Look = LookTowardMode.Movement;
            }
            else if (rbLookTowardNearestOutsider.Checked)
            {
                MiniGrouperScript.Data.Look = LookTowardMode.NearestOutsider;
            }
            else if (rbLookTowardNearestMember.Checked)
            {
                MiniGrouperScript.Data.Look = LookTowardMode.NearestMember;
            }
            else if (rbLookTowardSpecificCreature.Checked)
            {
                MiniGrouperScript.Data.Look = LookTowardMode.Creature;
            }

            MiniGrouperScript.DataChanged();
            MiniGrouperScript.UpdateLook();
        }
Exemplo n.º 3
0
        private void trkColumnsRadius_Scroll(object sender, EventArgs e)
        {
            if (formationEditingMode == FormationEditingMode.None)
            {
                return;
            }

            EnsureFormationMode();

            if (formationEditingMode == FormationEditingMode.Radius)
            {
                lastRadius = trkColumnsRadius.Value;
            }
            else
            {
                lastColumnCount = trkColumnsRadius.Value;
                MiniGrouperScript?.ClearLastMemberLocationCache();
            }

            if (MiniGrouperScript != null)
            {
                MiniGrouperScript.Data.ColumnRadius = trkColumnsRadius.Value;
                MiniGrouperScript.DataChanged();
            }

            //ResetRotationToZero();
            UpdateColumnRadiusLabel();
            UpdateFormation();
        }
Exemplo n.º 4
0
        void InitializeNewlySpawnedCreatures()
        {
            Talespire.Log.Indent();
            UnityMainThreadDispatcher.ExecuteOnMainThread(() =>
            {
                RefreshMemberList();
                MiniGrouperScript.RefreshIndicators();
                UpdateFormation();
            });

            MiniGrouperScript.DataChanged();
            Talespire.Log.Unindent();
        }
Exemplo n.º 5
0
        private void SetFormationStyle(FormationStyle formationStyle)
        {
            if (formationStyle != FormationStyle.FreeForm && !rbFormation.Checked)
            {
                bool saveChangingInternally = changingInternally;
                changingInternally  = true;
                rbFormation.Checked = true;
                changingInternally  = saveChangingInternally;
            }

            if (MiniGrouperScript != null)
            {
                MiniGrouperScript.Data.FormationStyle = formationStyle;
                MiniGrouperScript.DataChanged();
            }
        }
Exemplo n.º 6
0
        void UpdateMovementMode()
        {
            if (changingInternally || MiniGrouperScript == null)
            {
                return;
            }

            if (rbFormation.Checked)
            {
                MiniGrouperScript.Data.Movement = GroupMovementMode.Formation;
            }
            else
            {
                MiniGrouperScript.Data.Movement = GroupMovementMode.FollowTheLeader;
            }
            MiniGrouperScript.DataChanged();
        }
Exemplo n.º 7
0
 private void trkArcAngle_MouseUp(object sender, MouseEventArgs e)
 {
     MiniGrouperScript?.DataChanged();
 }