public override void LoadStep2() { HudUserInfoManagerScript = new HudUserInfoManager(); HudUserInfoManagerScript.Create(); HudNumberSetManagerScript = new HudNumberSetManager(); HudNumberSetManagerScript.Create(); Load_Step = LOAD_STEP._STEP3; }
public override void Create() { if (m_scriptNumberSetManager == null) { m_scriptNumberSetManager = Main.inst.GetHudManager().GetHudNumberSetManager(); } if (m_listChild == null) { m_listChild = new List <GameObject>(); } m_IsCommaOn = false; }
private void SetChildPos() { if (m_listChild != null) { int Max = m_listChild.Count; for (int i = 0; i < Max; i++) { if (m_listChild[i].GetComponent <EzGui_Texture>()) { m_listChild[i].GetComponent <EzGui_Texture>().SetAnchor(m_ChildAnchor); } float compute = 0.0f; switch (m_ChildAnchor) { case SpriteRoot.ANCHOR_METHOD.UPPER_LEFT: case SpriteRoot.ANCHOR_METHOD.MIDDLE_LEFT: case SpriteRoot.ANCHOR_METHOD.BOTTOM_LEFT: compute = i; break; case SpriteRoot.ANCHOR_METHOD.UPPER_CENTER: case SpriteRoot.ANCHOR_METHOD.MIDDLE_CENTER: case SpriteRoot.ANCHOR_METHOD.BOTTOM_CENTER: compute = (1.0f - Max + 2.0f * i) / 2.0f; break; case SpriteRoot.ANCHOR_METHOD.UPPER_RIGHT: case SpriteRoot.ANCHOR_METHOD.MIDDLE_RIGHT: case SpriteRoot.ANCHOR_METHOD.BOTTOM_RIGHT: compute = (Max - i - 1.0f) * -1.0f; break; } m_listChild[i].transform.localPosition = HudNumberSetManager.GetChildBasePos() * compute; } } }