Пример #1
0
 /// <summary>
 /// 刷新主界面的数据
 /// </summary>
 /// <param name="arg1"></param>
 /// <param name="arg2"></param>
 private void RefreshUIShowData(int arg1, IntCD arg2)
 {
     incomeCoinMS      = PlayerDataModule.CurrScenePerMinCoin(true);
     earningsText.text = MinerBigInt.ToDisplay(incomeCoinMS) + GetL10NString("Ui_Text_67");
     arg2.Reset();
     arg2.Run();
 }
    /// <summary>
    /// 测试不包含buff的/m
    /// </summary>
    private void OnTestNoBuff()
    {
        var incomeCoinMS01 = PlayerDataModule.CurrScenePerMinCoin(true);
        var incomeCoinMS02 = PlayerDataModule.LeaveScenePerMinCoin(1, true);

        LogWarp.LogError("测试:    附带buff的" + MinerBigInt.ToDisplay(incomeCoinMS01));
        LogWarp.LogError("测试:    不带buff的" + MinerBigInt.ToDisplay(incomeCoinMS02));
    }
Пример #3
0
    /// <summary>
    /// 监听buff成功
    /// </summary>
    /// <param name="obj"></param>
    private void OnAddBuffSucceed(Message obj)
    {
        float timeCount = 0.1f;

        DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate {
            incomeCoinMS      = PlayerDataModule.CurrScenePerMinCoin(true);
            earningsText.text = MinerBigInt.ToDisplay(incomeCoinMS) + GetL10NString("Ui_Text_67");
        }));
    }
    /// <summary>
    /// 控件显示赋值
    /// </summary>
    private void InitCompent()
    {
        playerAnimal         = GlobalDataManager.GetInstance().playerData.GetPlayerAnimalData();
        playerData           = GlobalDataManager.GetInstance().playerData;
        incomeCoinMS         = PlayerDataModule.CurrScenePerMinCoin(true);
        goldText.text        = playerData.playerZoo.playerCoin.GetCoinByScene(playerData.playerZoo.currSceneID).coinShow;
        starText.text        = playerData.playerZoo.star.ToString();
        diamondText.text     = playerData.playerZoo.diamond.ToString();
        earningsText.text    = MinerBigInt.ToDisplay(incomeCoinMS) + GetL10NString("Ui_Text_67");
        littleZooModuleDatas = playerData.playerZoo.littleZooModuleDatasMSS;
        int   animalAtlasNambe = GlobalDataManager.GetInstance().playerData.playerZoo.animalMSS15.animalProps.Count;
        float allNumber        = Config.animalatlasConfig.getInstace().RowNum * 5f;

        percentageText.text = (animalAtlasNambe * 100 / allNumber).ToString("f2") + "%";
        valueText.text      = string.Format(GetL10NString("Ui_Text_60"), animalAtlasNambe, allNumber);
        slider.value        = (animalAtlasNambe / allNumber);

        //UI绘制
    }
Пример #5
0
    /// <summary>
    /// 离线金币计算
    /// 计算所第一个场景的离线收益
    /// </summary>
    /// <returns></returns>
    protected void CalcOfflineRewardCoinMMSC()
    {
        //离线时间
        long offlineSeconds = (long)GlobalDataManager.GetInstance().offlineSeconds;

        if (offlineSeconds <= 0)
        {
            PageMgr.ClosePage(this);
        }

        //离线时间不能超出最大值
        if (offlineSeconds >= Config.globalConfig.getInstace().WaitingADTimeMax)
        {
            offlineSeconds = Config.globalConfig.getInstace().WaitingADTimeMax;
        }

        var perMinCoin = PlayerDataModule.CurrScenePerMinCoin(true);

        offlineRewardCoin = offlineSeconds * perMinCoin / 60;
    }
    /// <summary>
    /// 初始化控件属性
    /// </summary>
    private void InitComment()
    {
        //InitData();
        //对相机的显示隐藏
        mainCamera.gameObject.SetActive(true);
        animalShowCamera.gameObject.SetActive(true);

        playerData       = GlobalDataManager.GetInstance().playerData;
        goldText.text    = playerData.playerZoo.playerCoin.GetCoinByScene(playerData.playerZoo.currSceneID).coinShow;
        starText.text    = playerData.playerZoo.star.ToString();
        diamondText.text = playerData.playerZoo.diamond.ToString();

        earningsText.text = MinerBigInt.ToDisplay(PlayerDataModule.CurrScenePerMinCoin(true)) + GetL10NString("Ui_Text_67");

        particleSystem.Play();
        string zooID = m_data.ToString();
        //删除Plane  对象下面的子对象,添加新的动物预制体
        Transform gameObject = animalShowCamera.transform.Find("Plane");
        int       childCount = gameObject.childCount;

        for (int i = 0; i < childCount; i++)
        {
            UnityEngine.Object.Destroy(gameObject.GetChild(i).gameObject);
        }
        var cellRes = Config.resourceConfig.getInstace().getCell(zooID);
        var goPart  = ResourceManager.GetInstance().LoadGameObject(cellRes.prefabpath);

        goPart.transform.SetParent(animalShowCamera.transform.Find("Plane").transform, false);
        var scale = goPart.transform.localScale;

        goPart.transform.localScale = scale * cellRes.zoomratio;

        Vector3 vector = goPart.transform.position;

        goPart.transform.position = new Vector3(vector.x + cellRes.Xoffset, vector.y + cellRes.Yoffset, vector.z + cellRes.Zoffset);
        Animation animation = goPart.GetComponentInChildren <Animation>();

        animalShowCamera.GetComponent <ShowAnimelCamera>().animation = animation;
        animalShowCamera.GetComponent <ShowAnimelCamera>().ShowBool  = true;
    }
    /// <summary>
    /// 免费气球
    /// </summary>
    private void InitCompent_Viptiming()
    {
        //贵宾广告只算最新解锁的场景 / M收益
        BigInteger perMinCoin = 0;

        if (playerData.playerZoo.currSceneID == playerData.playerZoo.lastUnLockSceneID)
        {
            perMinCoin = PlayerDataModule.CurrScenePerMinCoin(true);
        }
        else
        {
            perMinCoin = PlayerDataModule.LeaveScenePerMinCoin(playerData.playerZoo.lastUnLockSceneID, true);
        }
        freeItemRwdCoinQuantity = perMinCoin * GetSceneAdcoefficient();

        TitleText.text     = GetL10NString("Ui_Text_111");
        TipsText_1.text    = GetL10NString("Ui_Text_112");
        RewardNumText.text = MinerBigInt.ToDisplay(freeItemRwdCoinQuantity);
        int scenetype = Config.sceneConfig.getInstace().getCell(playerData.playerZoo.currSceneID).moneyid;

        iconPath          = Config.moneyConfig.getInstace().getCell(scenetype).bigmoneyicon;
        RewardIcon.sprite = ResourceManager.LoadSpriteFromPrefab(iconPath);
    }
Пример #8
0
    void InitCompent()
    {
        //LogWarp.LogError(" 测试   InitCompent");
        condition = m_data.ToString();
        playerNumberOfVideosWatched = playerData.playerZoo.playerNumberOfVideosWatched;
        string iconPath = null;

        switch (condition)
        {
        case "TouristButton":
            titleText.text     = GetL10NString("Ui_Text_28");
            wordText.text      = GetL10NString("Ui_Text_29");
            rewardText.text    = string.Format(GetL10NString("Ui_Text_30"), numberVisitor);
            iconPath           = Config.globalConfig.getInstace().AdvertAddTourist;
            touristIcon.sprite = ResourceManager.LoadSpriteFromPrefab(iconPath);
            break;

        case "VisitButton":
            titleText.text = GetL10NString("Ui_Text_31");
            wordText.text  = GetL10NString("Ui_Text_32");
            var cell = Config.buffConfig.getInstace().getCell(10);
            rewardText.text    = string.Format(GetL10NString("Ui_Text_33"), cell.time);
            iconPath           = Config.globalConfig.getInstace().AdvertAddVisit;
            touristIcon.sprite = ResourceManager.LoadSpriteFromPrefab(iconPath);
            break;

        case "TicketButton":
            titleText.text = GetL10NString("Ui_Text_34");
            wordText.text  = GetL10NString("Ui_Text_35");
            var cell1 = Config.buffConfig.getInstace().getCell(12);
            rewardText.text    = string.Format(GetL10NString("Ui_Text_36"), cell1.time);
            iconPath           = Config.globalConfig.getInstace().AdvertAddTicket;
            touristIcon.sprite = ResourceManager.LoadSpriteFromPrefab(iconPath);

            break;

        case "FreeItemButton":

            //freeItemRwdCoinQuantity = PlayerDataModule.AllScenePerMinCoin(true) * GetSceneAdcoefficient();
            //贵宾广告只算最新解锁的场景 / M收益
            BigInteger perMinCoin = 0;
            if (playerData.playerZoo.currSceneID == playerData.playerZoo.lastUnLockSceneID)
            {
                perMinCoin = PlayerDataModule.CurrScenePerMinCoin(true);
            }
            else
            {
                perMinCoin = PlayerDataModule.LeaveScenePerMinCoin(playerData.playerZoo.lastUnLockSceneID, true);
            }
            freeItemRwdCoinQuantity = perMinCoin * GetSceneAdcoefficient();

            titleText.text  = GetL10NString("Ui_Text_111");
            wordText.text   = GetL10NString("Ui_Text_112");
            rewardText.text = MinerBigInt.ToDisplay(freeItemRwdCoinQuantity);
            int scenetype = Config.sceneConfig.getInstace().getCell(playerData.playerZoo.currSceneID).moneyid;
            iconPath           = Config.moneyConfig.getInstace().getCell(scenetype).bigmoneyicon;
            touristIcon.sprite = ResourceManager.LoadSpriteFromPrefab(iconPath);
            break;

        default:
            break;
        }
    }
 protected void OnGetBroadcastCoinOfPlayerDataMSSC(Message obj)
 {
     goldText.text     = playerData.playerZoo.playerCoin.GetCoinByScene(playerData.playerZoo.currSceneID).coinShow;
     earningsText.text = MinerBigInt.ToDisplay(PlayerDataModule.CurrScenePerMinCoin(true)) + GetL10NString("Ui_Text_67");
     //Logger.LogWarp.LogError("测试:AAAAAA     " + playerData.playerZoo.coin.ToString());
 }