/// <summary>
    /// 升级
    /// </summary>
    public void LevelUpScene(int addMoneyRate, float deleyAddGoldTime)
    {
        GameBean gameData = manager.GetGameData();

        if (gameData.levelProgressForScene < 1)
        {
            return;
        }
        int  totalLevel = gameData.levelForSpeed + gameData.levelForGoldPrice + gameData.levelForPirateNumber;
        long addMoney   = handler_GameData.GetLevelSceneMoney(totalLevel);

        gameData.LevelUpForScene();
        StartCoroutine(CoroutineForDelayAddGold(deleyAddGoldTime, addMoneyRate * addMoney));
    }
Beispiel #2
0
    public void OnClickForLevelUp()
    {
        GameBean gameData = handler_Game.GetGameData();

        if (gameData.levelProgressForScene < 1)
        {
            return;
        }
        int  totalLevel = gameData.levelForSpeed + gameData.levelForPirateNumber + gameData.levelForGoldPrice;
        long addMoney   = handler_GameData.GetLevelSceneMoney(totalLevel);

        DialogBean           dialogData       = new DialogBean();
        DialogForLevelUpView dialogForLevelUp = manager_Dialog.CreateDialog <DialogForLevelUpView>(DialogEnum.LevelUp, this, dialogData);

        dialogForLevelUp.SetData(addMoney);
    }