public static CInputMgr GetInstance() { if (m_instance == null) { m_instance = new CInputMgr(); } return(m_instance); }
// Use this for initialization void Start() { CInputMgr.GetInstance(); int UIWidth, UIHeight; CGameMgr.GetInstance().GetUISize(out UIWidth, out UIHeight); int labelWidth, labelHeight; m_label = transform.GetComponent <UILabel>(); labelWidth = Convert.ToInt32(m_label.localSize.x); labelHeight = Convert.ToInt32(m_label.localSize.y); this.transform.localPosition = new Vector3(-UIWidth * 0.5f + labelWidth * 0.5f + width, UIHeight * 0.5f - labelHeight * 0.5f - height, 0); }