protected override void Awake() { base.Awake(); _matTpl = transform.Find("Adapter/UIMatrix").GetComponent <UIMatrix>(); _tranLeft = transform.Find("Adapter/m/1/Left") as RectTransform; _tranRight = transform.Find("Adapter/m/1/Right") as RectTransform; _matLeft = GameObject.Instantiate <UIMatrix>(_matTpl, _tranLeft); _matLeft.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; _matLeft.gameObject.SetActive(true); _matRight = GameObject.Instantiate <UIMatrix>(_matTpl, _tranRight); _matRight.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; _matRight.gameObject.SetActive(true); _btnTranspose = transform.Find("Adapter/m/1/btnTranspose").GetComponent <Button>(); _btnTranspose.onClick.AddListener(OnClickBtnTranspose); }
protected override void Awake() { base.Awake(); _matTpl = transform.Find("Adapter/UIMatrix").GetComponent <UIMatrix>(); _tranLHS = transform.Find("Adapter/m/1/LHS") as RectTransform; _tranRHS = transform.Find("Adapter/m/1/RHS") as RectTransform; _tranResult = transform.Find("Adapter/m/1/Result") as RectTransform; _matLHS = GameObject.Instantiate <UIMatrix>(_matTpl, _tranLHS); _matLHS.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; _matLHS.gameObject.SetActive(true); _matRHS = GameObject.Instantiate <UIMatrix>(_matTpl, _tranRHS); _matRHS.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; _matRHS.gameObject.SetActive(true); _matResult = GameObject.Instantiate <UIMatrix>(_matTpl, _tranResult); _matResult.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; _matResult.gameObject.SetActive(true); _btnNumMulti = transform.Find("Adapter/m/1/btnNumMulti").GetComponent <Button>(); _btnNumMulti.onClick.AddListener(OnClickBtnNumMulti); }
internal void Init(UIMatrix parent, int row, int colume) { _parent = parent; _row = row; _colume = colume; }