Exemple #1
0
        void OnClickBuy(object ob = null)
        {
            PlayerModel playerModel = ModelManager.Get("PlayerModel") as PlayerModel;
            int         emptyIndex  = playerModel.GetEmptyPreIndex();

            if (emptyIndex == -1 && !playerModel.CanRoleUpLevel(roleId, 1, 2))
            {
                WndTips.ShowTips("您的备战区已满,不能再获得角色");
            }
            else
            {
                (ModelManager.Get("RoleShopModel") as RoleShopModel).OnBuyRole(index);
            }
        }
Exemple #2
0
        void ShowCanLevelView()
        {
            PlayerModel playerModel = ModelManager.Get("PlayerModel") as PlayerModel;
            bool        ress        = playerModel.CanRoleUpLevel(roleId, 1, 2);

            if (ress)
            {
                bgImage.DOColor(Color.red, 0.8f);
            }
            else
            {
                bgImage.color = Color.white;
            }
        }