Esempio n. 1
0
    protected override void OnOpen(object param = null)
    {
        base.OnOpen();

        EventSystem.Instance.addEventListener(CreateRoleEvent.LOGIN_EVENT_CREATE_ROLE_RST, onRst);
        EventSystem.Instance.addEventListener(CreateRoleEvent.LOGIN_EVENT_GET_RANDOM_NAME_RST, onRandomNameRst);

        CreateRoleModule module = ModuleManager.Instance.FindModule <CreateRoleModule>();

        module.SetRoleID(1);
        PlayerTableItem items = DataManager.PlayerTable[module.GetRoleID()] as PlayerTableItem;

        if (items != null)
        {
            roleText.text = items.desc;
        }
        UIAtlasHelper.SetButtonImage(girlBut, "login:girlan", true);
        NGUITools.SetActive(girlSpecial.gameObject, false);
    }
Esempio n. 2
0
    void onLoginButtonClickReturn(GameObject target)
    {
        CreateRoleModule module = ModuleManager.Instance.FindModule <CreateRoleModule>();

        mUserName.value = "";
        module.SetRoleID(1);
        NGUITools.SetActive(manSpecial.gameObject, true);
        PlayerTableItem items = DataManager.PlayerTable[module.GetRoleID()] as PlayerTableItem;

        if (items == null)
        {
            return;
        }
        roleText.text  = items.desc;
        mMessage1.text = "";
        mMessage.text  = "";
        UIAtlasHelper.SetButtonImage(girlBut, "login:girlan", true);
        NGUITools.SetActive(girlSpecial.gameObject, false);
        NGUITools.SetActive(createName.gameObject, false);
    }
Esempio n. 3
0
    void onGirlButtonClick(GameObject target)
    {
        CreateRoleModule module = ModuleManager.Instance.FindModule <CreateRoleModule>();
        uint             Roleid = module.GetRoleID();

        if (Roleid == 1)
        {
            UIAtlasHelper.SetButtonImage(manBut, "login:manan", true);
            NGUITools.SetActive(manSpecial.gameObject, false);
        }
        if (Roleid != 2)
        {
            module.SetRoleID(2);
            NGUITools.SetActive(girlSpecial.gameObject, true);
            PlayerTableItem items = DataManager.PlayerTable[module.GetRoleID()] as PlayerTableItem;
            if (items == null)
            {
                return;
            }
            roleText.text = items.desc;
        }
    }