Exemple #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;
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        //btn = transform.Find("Panel/Button").GetComponent<Button>();
        //btn.onClick.AddListener(delegate { OnClickBtn(); });
        //EventTriggerListener.Get(transform.Find("Panel/Button").gameObject).SetEventHandle(EnumTouchEventType.onClick,Close);
        text = transform.Find("Panel/Text").GetComponent<Text>();
        EventTriggerListener listener = EventTriggerListener.Get(transform.Find("Panel/Button").gameObject);
        listener.SetEventHandle(EnumTouchEventType.onClick,Close,1,"1234");

        testOneModule = ModuleManager.Instance.Get<TestOneModule>();
        text.text = testOneModule.Gold.ToString();
    }
Exemple #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");

        oneModule = ModuleManager.Instance.Get <TestOneModule>();
        text.text = "Gold: " + oneModule.Gold;
    }