Exemple #1
0
    private void Start()
    {
        plotMode = UIManagerScript.learn;
        CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
        if (plotMode)
        {
            plotActionsEnumerator = plotController.PlotActions().GetEnumerator();
        }
        difficultyCurve = x =>
        {
            var result = (int)(difficultyK * Math.Pow(x, difficultyA) + difficultyM);
            return(result < 1 ? 1 : result);
        };
        threatDifficult = GetNextCurveValue(startThreatDifficult, difficultyCurve);
        threatDifficult.MoveNext();
        spawnTimeCurve = x =>
        {
            var result = (int)(spawnTimeK * Math.Pow(x, spawnTimeA) + spawnTimeM);
            return(result < 1 ? 1 : result);
        };
        timeToThreatSpawn = GetNextCurveValue(startTimeToThreatSpawn, spawnTimeCurve);
        timeToThreatSpawn.MoveNext();

        threatSpawnCounter = startTimeToThreatSpawn;
        ProteinPoints      = startProteinCount;
        InvokeRepeating(nameof(TimerTick), 0, 1);
    }