Exemplo n.º 1
0
    private void OnClick(GameObject go)
    {
        Equip_Func_Type type      = Equip_Func_Type.Null;
        NotificationID  open_type = NotificationID.NULL;

        if (go.transform.name == "backBtn")
        {
            Facade.SendNotification(NotificationID.EquipMain_Hide);
        }


        switch (go.transform.name)
        {
        case "strongBtn":
            type      = Equip_Func_Type.Strong;
            open_type = NotificationID.EquipStrong_Hide;
            break;

        case "starBtn":
            type      = Equip_Func_Type.Star;
            open_type = NotificationID.EquipStar_Hide;
            break;

        case "insetBtn":
            type      = Equip_Func_Type.Inset;
            open_type = NotificationID.EquipInset_Hide;

            break;

        case "inheritBtn":
            type      = Equip_Func_Type.Inherit;
            open_type = NotificationID.EquipInherit_Hide;

            break;

        case "makeBtn":
            type      = Equip_Func_Type.Make;
            open_type = NotificationID.EquipMake_Hide;

            break;

        case "compoundBtn":
            type      = Equip_Func_Type.Compound;
            open_type = NotificationID.GemCompound_Hide;

            break;
        }

        if (open_type != cur_open_equip)
        {
            Facade.SendNotification(cur_open_equip);
            cur_open_equip = open_type;
        }

        if (type != cur_type)
        {
            cur_type = type;
            OpenFunction();
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 界面显示
    /// </summary>
    protected override void OnShow(INotification notification)
    {
        if (equipMediator == null)
        {
            equipMediator = Facade.RetrieveMediator("EquipMediator") as EquipMediator;
        }

        bool isHas = EquipConfig.IsHasEquip();

        cur_type       = isHas ? Equip_Func_Type.Strong : Equip_Func_Type.Make;
        cur_open_equip = isHas ? NotificationID.EquipStrong_Hide : NotificationID.EquipMake_Hide;

        Init();

        RefreshBtnStates();

        SetPlayerInfo();
        SetEquipGridInfo(cur_select_player_id);
        OpenFunction();
    }
Exemplo n.º 3
0
 private void ResetInfo()
 {
     cur_type       = Equip_Func_Type.Strong;
     cur_open_equip = NotificationID.EquipStrong_Hide;
     cur_equip      = null;
 }