示例#1
0
    public void Load(GameManager gameManager)
    {
        double diff = (DateTime.Now - saveTime).TotalSeconds;
        double maxHp = new Monster(gameManager.stageManager.currentStage, MonsterRank.NORMAL, gameManager).maxHealth;
        double totalDPS = gameManager.GetDPS() * diff;
        double gold = gameManager.GetGoldFromMonster(MonsterRank.NORMAL, gameManager.stageManager.currentStage);
        int    monsterKilled = 0;

        while ((totalDPS - maxHp) > 0)
        {
            totalDPS -= maxHp;
            monsterKilled++;
        }
        Debug.Log("Gold: " + gold);
        Debug.Log("Game Gold: " + gameManager.gold);
        gold *= monsterKilled;
        gameManager.gold += gold;
        Debug.Log(saveTime);
        Debug.Log(version);
        Debug.Log("Difference: " + diff);
        Debug.Log("Hp: " + maxHp);
        Debug.Log("DPS: " + totalDPS);
        Debug.Log("MonsterKilled: " + monsterKilled);
        Debug.Log("Gold: " + gold);
        Debug.Log("Game Gold: " + gameManager.gold);
    }