diff options
Diffstat (limited to 'Client/Assembly-CSharp/DotAligner.cs')
-rw-r--r-- | Client/Assembly-CSharp/DotAligner.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/DotAligner.cs b/Client/Assembly-CSharp/DotAligner.cs new file mode 100644 index 0000000..149f4c8 --- /dev/null +++ b/Client/Assembly-CSharp/DotAligner.cs @@ -0,0 +1,43 @@ +using System; +using UnityEngine; + +public class DotAligner : MonoBehaviour +{ + public float Width = 2f; + + public bool Even; + + public void Start() + { + int num = 0; + for (int i = 0; i < base.transform.childCount; i++) + { + if (base.transform.GetChild(i).gameObject.activeSelf) + { + num++; + } + } + float num2; + float num3; + if (this.Even) + { + num2 = -this.Width * (float)(num - 1) / 2f; + num3 = this.Width; + } + else + { + num2 = -this.Width / 2f; + num3 = this.Width / (float)(num - 1); + } + int num4 = 0; + for (int j = 0; j < base.transform.childCount; j++) + { + Transform child = base.transform.GetChild(j); + if (child.gameObject.activeSelf) + { + child.transform.localPosition = new Vector3(num2 + (float)num4 * num3, 0f, 0f); + num4++; + } + } + } +} |