Exemplo n.º 1
0
    void Start()
    {
        text = this.transform.Find("Panel/Text02").GetComponent <Text>();
        EventTriggerListener listener = EventTriggerListener.Get(transform.Find("Panel/Button").gameObject);

        listener.SetEventHandle(EnumTouchEventType.OnClick, Close, 1, "111");
        listener.SetEventHandle(EnumTouchEventType.OnClick, OnClickBtn);
        oneModule = ModuleManager.Instance.Get <TestOneModule> ();
        text.text = "gold:" + oneModule.Gold;
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
//        btn = transform.Find("Panel/Button").GetComponent<Button>();
//        btn.onClick.AddListener(OnClickBtn);
        text = transform.Find("Panel/Text").GetComponent <Text>();

        //EventTriggerListener.Get (transform.Find ("Panel/Button").gameObject).SetEventHandle (EnumTouchEventType.OnClick, Close);

        EventTriggerListener listener = EventTriggerListener.Get(transform.Find("Panel/Button").gameObject);

        listener.SetEventHandle(EnumTouchEventType.OnClick, Close, 1, "1234");
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
//		btn = transform.Find("Panel/Button").GetComponent<Button>();
//		btn.onClick.AddListener(OnClickBtn);

        text = transform.Find("Panel/Text").GetComponent <Text>();

        //EventTriggerListener.Get(transform.Find("Panel/Button").gameObject).SetEventHandle(EnumTouchEventType.OnClick, Close);

        // 绑定事件
        EventTriggerListener listener = EventTriggerListener.Get(transform.Find("Panel/Button").gameObject);

        listener.SetEventHandle(EnumTouchEventType.OnClick, Close, 1, "1234");

        // 拖拽事件
        listener.SetEventHandle(EnumTouchEventType.OnDrag, OnMyDrag, 1, "BeginDrag....");

        // 获取M 数据
        oneModule = ModuleManager.Instance.Get <TestOneModule>();
        text.text = "Gold: " + oneModule.Gold;
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        InitUI();

        // 事件Button_00 功能同Button_03
        EventTriggerListener listenerCoin = EventTriggerListener.Get(btn_coin.gameObject);

        listenerCoin.SetEventHandle(EnumTouchEventType.OnClick, OnButtonCoin, "OnClickCoin");

        // 事件Button_01 功能同Button_02
        EventTriggerListener listeneStart = EventTriggerListener.Get(btn_start.gameObject);

        listeneStart.SetEventHandle(EnumTouchEventType.OnClick, OnButtonStart, "OnClickStart");

        loginModule = ModuleManager.Instance.Get <LoginModule>();
        loginModule.Load();

        // Login界面打开初始化完成后,刷新一次数据
        Message message = new Message(MessageType.Message_LoginView_Is_Open, this);

        message.Send();

        MessageCenter.Instance.AddListener(MessageType.Message_Key_Game_Start, OnKeyStart);
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        EventTriggerListener listener = EventTriggerListener.Get(transform.Find("Panel/Button").gameObject);

        listener.SetEventHandle(EnumTouchEventType.OnClick, OnClickBtn);
    }