Beispiel #1
0
 private void Start()
 {
     cardParent   = transform.Find("CardPoint");
     cardCtrlList = new List <CardCtrl>();
     promptMsg    = new PromptMsg();
     socketMsg    = new SocketMsg();
 }
Beispiel #2
0
 /// <summary>
 /// 提示消息
 /// </summary>
 /// <param name="msg"></param>
 void PromptMessage(PromptMsg msg)
 {
     txt.text = msg.Text;
     // txt.color = msg.color;
     canvasGroup.alpha = 0;
     timer             = 0;
     StartCoroutine(PromptAnim());
 }
    private void Start()
    {
        this.cardCtrls = new List <CardCtrl>();
        this.cardPoint = transform.Find("CardPoint");

        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();
    }
Beispiel #4
0
    void Start()
    {
        btnCreat  = transform.Find("BtnCreat").GetComponent <Button>();
        inputName = transform.Find("InputName").GetComponent <InputField>();
        msg       = new PromptMsg();

        btnCreat.onClick.AddListener(BtnCreatClick);
    }
Beispiel #5
0
 public override void Execute(int eventCode, object message)
 {
     switch (eventCode)
     {
     case UIEvent.Prompt_Msg:
         PromptMsg msg = message as PromptMsg;
         PromptMessage(msg); break;
     }
 }
Beispiel #6
0
    // Use this for initialization
    void Start()
    {
        InputName = transform.Find("InputFieldName").GetComponent <InputField>();
        BtnCreate = transform.Find("ButtonCreate").GetComponent <Button>();
        BtnCreate.onClick.AddListener(CreateClick);

        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();
    }
    void Start()
    {
        inputName = transform.Find("inputName").GetComponent <InputField>();
        btnCreate = transform.Find("btnCreate").GetComponent <Button>();

        btnCreate.onClick.AddListener(createClick);

        promptMsg = new PromptMsg();
    }
 private void DealResponse(int value)
 {
     if (value == -1)
     {
         //管不上上一家出的牌
         PromptMsg promptMsg = new PromptMsg("玩家出的牌管不上上一个玩家出的牌", Color.red);
         Dispatch(AreaCode.UI, UIEvent.PROMPT_PANEL_SHOW, promptMsg);
         Dispatch(AreaCode.UI, UIEvent.SHOW_OR_HIDE_DEAL_BTN, true);
     }
 }
Beispiel #9
0
    void Start()
    {
        promptMsg = new PromptMsg();

        inputName = transform.Find("input_Nickname").GetComponent <InputField>();
        btnSubmit = transform.Find("btn_Submit").GetComponent <Button>();

        btnSubmit.onClick.AddListener(OnSubmitClick);

        Bind(UIEvent.Create_Panel);
    }
Beispiel #10
0
 private void DealResponse(int result)
 {
     if (result == -1)
     {
         //玩家出的牌关不上
         msg = new PromptMsg("管不上", Color.red);
         Dispatch(AreaCode.UI, UIEvent.PROMPTA_ANIM, msg);
         //重新显示出牌按钮
         Dispatch(AreaCode.UI, UIEvent.SHOW_DEAL_BUTTON, true);
     }
 }
Beispiel #11
0
    private void Start()
    {
        iptName   = transform.Find("iptName").GetComponent <InputField>();
        btnButton = transform.Find("btnCreate").GetComponent <Button>();
        promptMsg = new PromptMsg();

        btnButton.onClick.AddListener(onbtnCreateClick);

        //设置默认显示状态
        SetPanelActive(false);
    }
 /// <summary>
 /// 出牌响应
 /// </summary>
 /// <param name=""></param>
 private void dealResponse(int result)
 {
     if (result == -1)
     {
         //玩家出的牌管不上上一个玩家出的牌
         PromptMsg promptMsg = new PromptMsg("玩家出的牌管不上上一个玩家出的牌", Color.red);
         Dispatch(AreaCode.UI, UIEvent.PROMPT_MSG, promptMsg);
         //重新显示出牌按钮
         Dispatch(AreaCode.UI, UIEvent.SHOW_DEAL_BUTTON, true);
     }
 }
Beispiel #13
0
    void Start()
    {
        promptMsg = new PromptMsg();

        btnLogin      = transform.Find("btn_Login").GetComponent <Button>();
        btnClose      = transform.Find("btn_Close").GetComponent <Button>();
        inputAccount  = transform.Find("txt_Account/Input_Account").GetComponent <InputField>();
        inputPassword = transform.Find("txt_Password/Input_Password").GetComponent <InputField>();
        //注册事件
        btnLogin.onClick.AddListener(OnLoginClick);
        btnClose.onClick.AddListener(OnCloseClick);
    }
Beispiel #14
0
    public override void Execute(int eventCode, object message)
    {
        switch (eventCode)
        {
        case UIEvent.PROMPT_MSG:                        // 提示信息
            PromptMsg msg = message as PromptMsg;
            PromptMessage(msg.text, msg.color);
            break;

        default:
            break;
        }
    }
Beispiel #15
0
    public override void Execute(int eventCode, object message)
    {
        switch (eventCode)
        {
        case UIEvent.PROMPTA_ANIM:
            PromptMsg msg = message as PromptMsg;
            promptMsg(msg.txt, msg.color);
            break;

        default:
            break;
        }
    }
Beispiel #16
0
    void Start()
    {
        btnLogin    = transform.Find("BtnLogin").GetComponent <Button>();
        btnClose    = transform.Find("BtnClose").GetComponent <Button>();
        textID      = transform.Find("ID").GetComponent <InputField>();
        textPasword = transform.Find("Password").GetComponent <InputField>();

        btnLogin.onClick.AddListener(LoginClick);
        btnClose.onClick.AddListener(CloseClick);

        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();
        SetPanelActive(false);
    }
Beispiel #17
0
    // Use this for initialization
    void Start()
    {
        Bind(UIEvent.Login_PANEL_ACTIVE);
        inputAccount  = transform.Find("InputFieldAccount").GetComponent <InputField>();
        inputPassword = transform.Find("InputFieldPassword").GetComponent <InputField>();
        btnLogin      = transform.Find("ButtonLogin").GetComponent <Button>();
        btnClose      = transform.Find("ButtonClose").GetComponent <Button>();

        btnLogin.onClick.AddListener(Login);
        btnClose.onClick.AddListener(Close);

        socketMsg = new SocketMsg();
        promptMsg = new PromptMsg();
        setPanelActive(false);
    }
    public override void Execute(int eventCode, object message)
    {
        switch (eventCode)
        {
        case UIEvent.PROMPT_PANEL_SHOW:
        {
            PromptMsg promptMsg = message as PromptMsg;
            ShowPromptInf(promptMsg.Text, promptMsg.color);
        }
        break;

        default:
            break;
        }
    }
Beispiel #19
0
    // Use this for initialization
    void Start()
    {
        btnReigist    = transform.Find("btnReigist").GetComponent <Button>();
        btnClose      = transform.Find("btnClose").GetComponent <Button>();
        inputAccount  = transform.Find("inputAccount").GetComponent <InputField>();
        inputPassword = transform.Find("inputPassword").GetComponent <InputField>();
        inputRepeat   = transform.Find("inputRepeat").GetComponent <InputField>();

        btnClose.onClick.AddListener(closeClick);
        btnReigist.onClick.AddListener(registClick);
        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();

        setPanelActive(false);
    }
Beispiel #20
0
    void Start()
    {
        registerButton  = transform.Find("RegisterButton").GetComponent <Button>();
        closeButton     = transform.Find("CloseButton").GetComponent <Button>();
        usernameInput   = transform.Find("UsernameInput").GetComponent <InputField>();
        passwordInput   = transform.Find("PasswordInput").GetComponent <InputField>();
        repasswordInput = transform.Find("RePasswordInput").GetComponent <InputField>();

        closeButton.onClick.AddListener(CloseClick);
        registerButton.onClick.AddListener(RegisterClick);

        promptMsg = new PromptMsg();

        setPanelActive(false);
    }
Beispiel #21
0
    void Start()
    {
        btnRegist = transform.Find("BtnRegister").GetComponent <Button>();
        btnClose  = transform.Find("BtnClose").GetComponent <Button>();
        id        = transform.Find("ID").GetComponent <InputField>();
        password  = transform.Find("Password").GetComponent <InputField>();
        repeat    = transform.Find("Repeat").GetComponent <InputField>();

        btnRegist.onClick.AddListener(BtnRegistClick);
        btnClose.onClick.AddListener(CloseClick);

        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();
        SetPanelActive(false);
    }
Beispiel #22
0
    void Start()
    {
        btnLogin      = transform.Find("btnLogin").GetComponent <Button>();
        btnClose      = transform.Find("btnClose").GetComponent <Button>();
        inputAccount  = transform.Find("inputAccount").GetComponent <InputField>();
        inputPassword = transform.Find("inputPassword").GetComponent <InputField>();

        btnLogin.onClick.AddListener(OnbtnLogin);
        btnClose.onClick.AddListener(OnbtnClose);

        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();

        setPanelActive(false);
    }
Beispiel #23
0
    void Start()
    {
        loginButton   = transform.Find("LoginButton").GetComponent <Button>();
        closeButton   = transform.Find("CloseButton").GetComponent <Button>();
        usernameInput = transform.Find("UsernameInput").GetComponent <InputField>();
        passwordInput = transform.Find("PasswordInput").GetComponent <InputField>();

        loginButton.onClick.AddListener(loginClick);
        closeButton.onClick.AddListener(closeClick);

        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();

        //面板需要默认隐藏
        setPanelActive(false);
    }
Beispiel #24
0
    void Start()
    {
        promptMsg = new PromptMsg();

        btnRegist           = transform.Find("btn_Regist").GetComponent <Button>();
        btnClose            = transform.Find("btn_Close").GetComponent <Button>();
        inputAccount        = transform.Find("txt_Account/Input_Account").GetComponent <InputField>();
        inputPassword       = transform.Find("txt_Password/Input_Password").GetComponent <InputField>();
        inputPasswordRepeat = transform.Find("txt_RepeatPwd/Input_Password").GetComponent <InputField>();

        //注册事件
        btnRegist.onClick.AddListener(OnRegistClick);
        btnClose.onClick.AddListener(OnCloseClick);

        SetPanelActive(false);
        Bind(UIEvent.Regist_Code);
    }
Beispiel #25
0
    // Use this for initialization
    void Start()
    {
        Bind(UIEvent.REGIST_PANEL_ACTIVE);
        btnRegist = transform.Find("BtnRegist").GetComponent <Button>();
        btnClose  = transform.Find("BtnClose").GetComponent <Button>();

        inputAcc  = transform.Find("InputAcc").GetComponent <InputField>();
        inputPwd  = transform.Find("InputPwd").GetComponent <InputField>();
        inputPwd2 = transform.Find("InputPwd2").GetComponent <InputField>();

        btnRegist.onClick.AddListener(RegistClick);
        btnClose.onClick.AddListener(CloseClick);

        promptMsg = new PromptMsg();
        socketMsg = new SocketMsg();
        setPanelActive(false);
    }
Beispiel #26
0
 /// <summary>
 /// 通知所有组件刷新
 /// </summary>
 public virtual void refreshAll()
 {
     PromptMsg.Refresh();
     ChatMsg.Refresh();
     TipMsg.Refresh();
 }