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(); }
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(); }
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(); }
void InitializeNewlySpawnedCreatures() { Talespire.Log.Indent(); UnityMainThreadDispatcher.ExecuteOnMainThread(() => { RefreshMemberList(); MiniGrouperScript.RefreshIndicators(); UpdateFormation(); }); MiniGrouperScript.DataChanged(); Talespire.Log.Unindent(); }
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(); } }
void UpdateMovementMode() { if (changingInternally || MiniGrouperScript == null) { return; } if (rbFormation.Checked) { MiniGrouperScript.Data.Movement = GroupMovementMode.Formation; } else { MiniGrouperScript.Data.Movement = GroupMovementMode.FollowTheLeader; } MiniGrouperScript.DataChanged(); }
private void trkArcAngle_MouseUp(object sender, MouseEventArgs e) { MiniGrouperScript?.DataChanged(); }