Beispiel #1
0
 public static DailyGiftController CreatDailyGiftController()
 {
     UnityEngine.Object obj = WXLLoadPrefab.GetPrefab(WXLPrefabsName.UIDailyGiftPanel);
     if (obj != null)
     {
         GameObject          go      = Instantiate(obj) as GameObject;
         DailyGiftController fc      = go.GetComponent <DailyGiftController>();
         Transform           goTrans = go.transform;
         go.transform.parent        = DBUIController.mDBUIInstance._TopRoot.transform;
         go.transform.localPosition = Vector3.zero;
         goTrans.localScale         = Vector3.one;
         RED.TweenShowDialog(go);
         return(fc);
     }
     return(null);
 }
    public void SetInfo(DailyGiftController controller, string dayText, string giftInfo, int status = 0)
    {
        this.controller    = controller;
        this.day.text      = dayText;
        this.giftInfo.text = giftInfo;

        switch (status)
        {
        case 0:
            StatusWindow(false, false, false, false, true);    //default status (статус окна "награда не доступна"(кнопки скрыты, затемнения нет))
            break;

        case 1:
            StatusWindow(false, false, true, true, false);    // Gift can givet (статус окна "награда доступна, ожидает получения")
            break;

        case 2:
            StatusWindow(true, true, false, false, false);    // Gift collected (статус окна "награда получена"(кнопка скрыта, затемнение есть))
            break;
        }
    }
Beispiel #3
0
 void Awake()
 {
     instance = this;
 }
    public static void CreatActivity(ActivityItemType type, object objPos, System.Action callback = null)
    {
        //	AbsActivity AbsA= null;
        switch (type)
        {
        case ActivityItemType.festivalItem:
            if (_ActFestivalCtrl == null)
            {
                _ActFestivalCtrl = WXLActivityFestivalController.CreateFestivalPanel(ActivityItemType.festivalItem, (GameObject)objPos);
            }
            else
            {
                _ActFestivalCtrl.gameObject.SetActive(true);
            }

            //	ActivityNetController.GetInstance().SendLoginFestival ();
            break;

        case  ActivityItemType.mosterComeItem:
            if (_ActMonsterCtrl == null)
            {
                _ActMonsterCtrl = UIActMonsterComeController.CreateMonsterPanel(ActivityItemType.mosterComeItem, (GameObject)objPos);
            }
            else
            {
                _ActMonsterCtrl.gameObject.SetActive(true);
            }
            break;

        case ActivityItemType.taobaoItem:
            if (_ActTaoBaoCtrl == null)
            {
                _ActTaoBaoCtrl = UITaoBaoController.CreateTaoBaoPanel(ActivityItemType.taobaoItem, (GameObject)objPos);
            }
            else
            {
                _ActTaoBaoCtrl.gameObject.SetActive(true);
            }
            break;

        case ActivityItemType.dinnerItem:
            if (_ActDinnerCtrl == null)
            {
                _ActDinnerCtrl = ActDinnerController.CreateDinnerPanel(ActivityItemType.dinnerItem, (GameObject)objPos);
            }
            else
            {
                _ActDinnerCtrl.gameObject.SetActive(true);
            }
            break;

        case ActivityItemType.qiandaoItem:
            if (_ActDateSignCtrl == null)
            {
                _ActDateSignCtrl = UIDateSignController.CreateUIdateSignPanel(ActivityItemType.qiandaoItem, (GameObject)objPos);
            }
            else
            {
                _ActDateSignCtrl.gameObject.SetActive(true);
            }
            break;

        case ActivityItemType.levelRewardItem:
            if (_ActLevelRewardCtrl == null)
            {
                _ActLevelRewardCtrl = UILevelRewardController.CreateUILevelRewardPanel(ActivityItemType.levelRewardItem, (GameObject)objPos, callback);
            }
            else
            {
                _ActLevelRewardCtrl.gameObject.SetActive(true);
            }
            break;

        case ActivityItemType.gonggaoItem:
            AnnounceMrg.GetInstance().SetInfoPanel(true);
            break;

        case ActivityItemType.secretShopItem:
            SecretShopMgr.GetInstance().SetSecretShop(true, 1);
            DBUIController.mDBUIInstance.HiddenFor3D_UI();
            break;

        case ActivityItemType.vipEnter:
            UIDragonMallMgr.GetInstance().SetVipLibao();
            break;

        case ActivityItemType.TreasureBoxItem:
            if (_ActTreasureBoxCtrl == null)
            {
                _ActTreasureBoxCtrl = TreasureBoxController.CreatTreasureBoxCtr();
            }
            else
            {
                _ActTreasureBoxCtrl.gameObject.SetActive(true);
            }
            break;

        case ActivityItemType.RollGamblePanel:
            RollGambleController.CreatRollGamblePanel();
            break;

        case ActivityItemType.DailyGiftPanel:
            DailyGiftController.CreatDailyGiftController();
            break;

        case ActivityItemType.DragonBank:
            DragonBankController.CreatDragonBankController();
            break;

        default:
            //	AbsA = null;
            break;
        }
    }