コード例 #1
0
 private static void ResetComponentsStaticValues()
 {
     if (staticResetFunctions != null)
     {
         staticResetFunctions.Invoke();
         staticResetFunctions = null;
     }
     DockSystem.ResetRequest();
     Crew.Reset();
     Expedition.GameReset();
 }
コード例 #2
0
    private void SetDefaultValues()
    {
        Time.timeScale = 1;
        gameSpeed      = 1;
        pauseRequests  = 0;
        if (currentSavename == null || currentSavename == string.Empty)
        {
            currentSavename = "autosave";
        }
        if (gameMode != GameMode.Editor)
        {
            lifeGrowCoefficient = 1;
            switch (difficulty)
            {
            case Difficulty.Utopia:
                LUCK_COEFFICIENT               = 1;
                demolitionLossesPercent        = 0;
                lifepowerLossesPercent         = 0;
                sellPriceCoefficient           = 1;
                tradeVesselsTrafficCoefficient = 2;
                upgradeDiscount   = 0.5f; upgradeCostIncrease = 1.1f;
                gearsDegradeSpeed = 0;
                break;

            case Difficulty.Easy:
                LUCK_COEFFICIENT               = 0.7f;
                demolitionLossesPercent        = 0.2f;
                lifepowerLossesPercent         = 0.1f;
                sellPriceCoefficient           = 0.9f;
                tradeVesselsTrafficCoefficient = 1.5f;
                upgradeDiscount   = 0.3f; upgradeCostIncrease = 1.3f;
                gearsDegradeSpeed = 0.00001f;
                break;

            case Difficulty.Normal:
                LUCK_COEFFICIENT               = 0.5f;
                demolitionLossesPercent        = 0.4f;
                lifepowerLossesPercent         = 0.3f;
                sellPriceCoefficient           = 0.75f;
                tradeVesselsTrafficCoefficient = 1;
                upgradeDiscount   = 0.25f; upgradeCostIncrease = 1.5f;
                gearsDegradeSpeed = 0.00002f;
                break;

            case Difficulty.Hard:
                LUCK_COEFFICIENT               = 0.1f;
                demolitionLossesPercent        = 0.7f;
                lifepowerLossesPercent         = 0.5f;
                sellPriceCoefficient           = 0.5f;
                tradeVesselsTrafficCoefficient = 0.9f;
                upgradeDiscount   = 0.2f; upgradeCostIncrease = 1.7f;
                gearsDegradeSpeed = 0.00003f;
                break;

            case Difficulty.Torture:
                LUCK_COEFFICIENT               = 0.01f;
                demolitionLossesPercent        = 1;
                lifepowerLossesPercent         = 0.85f;
                sellPriceCoefficient           = 0.33f;
                tradeVesselsTrafficCoefficient = 0.75f;
                upgradeDiscount   = 0.1f; upgradeCostIncrease = 2f;
                gearsDegradeSpeed = 0.00005f;
                break;
            }
            RenderSettings.skybox.SetFloat("_Saturation", 0.75f + 0.25f * GameConstants.START_HAPPINESS);
        }
        else
        {
            RenderSettings.skybox.SetFloat("_Saturation", 1f);
        }
        DockSystem.ResetRequest();
    }