Exemplo n.º 1
0
    public override void Execute(INotice notice)
    {
        switch (notice.GetType())
        {
        case Command_Show:
            GameObject go   = null;
            GameObject root = GameObject.Find("UIRoot");
            go            = root.transform.Find("OtherWindow").gameObject;
            this.mediator = RegisterMediator <OtherMediator>(go);
            this.SendToMediator(notice);
            break;

        case Command_Close:
            RemoveMediator();
            break;

        case Command_OK:
            ChangeScene("OtherScene", (token) => {
                SelfNotice(Command_Show);
            });
            break;
        }
        base.Execute(notice);
    }
Exemplo n.º 2
0
 protected override void OnDispose()
 {
     SaveViewObj();
     that = null;
     base.OnDispose();
 }
Exemplo n.º 3
0
 protected override void OnInitialize()
 {
     that        = this;
     this.button = this.transform.Find("Image/Button").GetComponent <Button>();
     base.OnInitialize();
 }