diff --git a/Assets/GrimoireManager.cs b/Assets/GrimoireManager.cs index e1d3846..7f67541 100644 --- a/Assets/GrimoireManager.cs +++ b/Assets/GrimoireManager.cs @@ -30,7 +30,8 @@ public class GrimoireManager : MonoBehaviour public float MinTokenScale = 0.5f; public float MaxTokenScale = 2f; - public Slider ScaleSlider; + public Slider RoleScaleSlider; + public Slider HelperScaleSlider; private float TownRadius; public float MinTokenRadius = 300f; @@ -92,7 +93,8 @@ public void AddToken(RoleData roleData) grimoireToken.AddHelperToken(helperToken); } - grimoireToken.SetScale(Mathf.Lerp(MinTokenScale, MaxTokenScale, ScaleSlider.value)); + grimoireToken.SetRoleTokenScale(Mathf.Lerp(MinTokenScale, MaxTokenScale, RoleScaleSlider.value)); + grimoireToken.SetHelperTokenScale(Mathf.Lerp(MinTokenScale, MaxTokenScale, HelperScaleSlider.value)); UpdateGrimoire(); UpdateRoleCounts(); @@ -304,13 +306,23 @@ public void OnClickRandomize() ModalPanel.MessageBox("Randomize player positions?", RandomizeGrimoire, null, null, null, "YesNo"); } - public void ScaleSliderChanged(float value) + public void RoleScaleSliderChanged(float value) { Vector2 scale = Vector3.one * Mathf.Lerp(MinTokenScale, MaxTokenScale, value); foreach (var token in RoleTokens) { - token.SetScale(Mathf.Lerp(MinTokenScale, MaxTokenScale, ScaleSlider.value)); + token.SetRoleTokenScale(Mathf.Lerp(MinTokenScale, MaxTokenScale, RoleScaleSlider.value)); + } + } + + public void HelperScaleSliderChanged(float value) + { + Vector2 scale = Vector3.one * Mathf.Lerp(MinTokenScale, MaxTokenScale, value); + + foreach (var token in RoleTokens) + { + token.SetHelperTokenScale(Mathf.Lerp(MinTokenScale, MaxTokenScale, HelperScaleSlider.value)); } foreach (var token in AlignmentTokens) @@ -346,7 +358,7 @@ public void AddAlignmentToken() GameObject tokenObj = Instantiate(AlignmentTokenPrefab); tokenObj.GetComponent().anchoredPosition = gameObject.GetComponent().anchoredPosition; tokenObj.transform.SetParent(AlignmentTokenAttach.transform); - tokenObj.transform.localScale = Vector3.one * Mathf.Lerp(MinTokenScale, MaxTokenScale, ScaleSlider.value); + tokenObj.transform.localScale = Vector3.one * Mathf.Lerp(MinTokenScale, MaxTokenScale, HelperScaleSlider.value); tokenObj.transform.localPosition = Vector3.zero; AlignmentTokens.Add(tokenObj); } diff --git a/Assets/GrimoireToken.cs b/Assets/GrimoireToken.cs index c84cb15..a5fbf5d 100644 --- a/Assets/GrimoireToken.cs +++ b/Assets/GrimoireToken.cs @@ -113,9 +113,13 @@ public void SetIsBluffToken() GetComponentInChildren