Beispiel #1
0
        public void SetText(string itemName, string componentName, string str)
        {
            UISubMgr tmp = GetGameObject <UISubMgr>(itemName);

            if (tmp != null)
            {
                tmp.SetText(componentName, str);
            }
        }
Beispiel #2
0
        private void Start()
        {
            loginModel = new LoginModel();
            loginLogic = new LoginLogic(loginModel);


            Ninput_Account = GetGameObject <InputField>("Ninput_Account");
            Ninput_Psd     = GetGameObject <InputField>("Ninput_Psd");

            AddButtonListener("Nbtn_Login", loginLogic.OnClick);

            AddInputFieldEndEditListener("Ninput_Account", loginLogic.AccountEndEdit);
            AddInputFieldEndEditListener("Ninput_Psd", loginLogic.PasswordEndEdit);

            SetText("Ntxt", "赋值text");


            OnEventHandler("Ntxt", EventTriggerType.Drag, DragCallback);


            subMgr = GetGameObject <UISubMgr>("itemName");
            subMgr.SetText("txt_C", "laowang");
        }