Ejemplo n.º 1
0
    public void OnLoginClick(BaseEventData data)
    {
        print("login");
        this.MoveOut();
        maininterfacePanel.transform.GetComponent <MainInterface> ().FadeIn();

        Hashtable table = new Hashtable();

        table.Add("UserName", account.text);
        CustomEventData eventdata = new CustomEventData("AccountChange", table, this.gameObject);

        CustomEventManager.GetInstance().DispatchEvent(eventdata);
    }
Ejemplo n.º 2
0
    void Awake()
    {
        GameObject nameBtn   = transform.Find("Btn-UserName").gameObject;
        GameObject serverBtn = transform.Find("Btn-Server").gameObject;
        GameObject startBtn  = transform.Find("Btn-Start").gameObject;

        EventTriggerManager.GetInstance().AddTriggerEvent(nameBtn, EventTriggerType.PointerClick, OnNameClick);
        EventTriggerManager.GetInstance().AddTriggerEvent(serverBtn, EventTriggerType.PointerClick, OnServerClick);
        EventTriggerManager.GetInstance().AddTriggerEvent(startBtn, EventTriggerType.PointerClick, OnStartClick);

        tweenAni = transform.GetComponent <DOTweenAnimation> ();
        username = nameBtn.transform.Find("Name").GetComponent <Text> ();

        CustomEventManager.GetInstance().AddEventListener("AccountChange", OnEventAccountChange);
    }
Ejemplo n.º 3
0
 void OnDestory()
 {
     CustomEventManager.GetInstance().RemoveEventListener("AccountChange", OnEventAccountChange);
 }