public void Log10(UnaryTestCase testCase)
 {
     testCase.AssertEqual(Math.Log10, d => BigDouble.Log10(d));
 }
예제 #2
0
    public void Update()
    {
        var data = game.data;

        shardsText.text = $"Crystal Shards: {Methods.NotationMethod(data.crystalShards, "F2")} ({Methods.NotationMethod(shardsBoost, "F2")}x)";

        reward[0] = BigDouble.Log10(currencies[0] + 1);
        reward[1] = BigDouble.Log10(currencies[1] / 5 + 1);
        reward[2] = BigDouble.Log10(currencies[2] + .5);
        reward[3] = BigDouble.Log10(currencies[3] / 2.5 + 1);
        reward[4] = BigDouble.Log10(currencies[4] + .25);
        reward[5] = BigDouble.Log10(currencies[5] / 1.25 + 1);
        reward[6] = BigDouble.Log10(currencies[6] + 1.25);

        for (int i = 0; i < 7; i++)
        {
            costs[i] = 10 * BigDouble.Pow(1.15, levels[i]);
        }

        if (previousDayChecked != DayOfTheWeek() & eventActive)
        {
            data.eventActiveID = 0;
            for (var i = 0; i < 7; i++)
            {
                data.eventCooldown[i] = 0;
            }
        }

        switch (DayOfTheWeek())
        {
        case "Monday":
            if (game.eventsGroup.gameObject.activeSelf)
            {
                RunEventUI(0);
            }
            break;

        case "Tuesday":
            if (game.eventsGroup.gameObject.activeSelf)
            {
                RunEventUI(1);
            }
            RunEvent(1);
            break;

        case "Wednesday":
            if (game.eventsGroup.gameObject.activeSelf)
            {
                RunEventUI(2);
            }
            break;

        case "Thursday":
            if (game.eventsGroup.gameObject.activeSelf)
            {
                RunEventUI(3);
            }
            RunEvent(3);
            break;

        case "Friday":
            if (game.eventsGroup.gameObject.activeSelf)
            {
                RunEventUI(4);
            }
            break;

        case "Saturday":
            if (game.eventsGroup.gameObject.activeSelf)
            {
                RunEventUI(5);
            }
            RunEvent(5);
            break;

        case "Sunday":
            if (game.eventsGroup.gameObject.activeSelf)
            {
                RunEventUI(6);
            }
            break;
        }

        if (data.eventActiveID == 0 & game.data.eventCooldown[CurrentDay()] > 0)
        {
            game.data.eventCooldown[CurrentDay()] -= Time.deltaTime;
        }
        else if (data.eventActiveID != 0 & game.data.eventCooldown[CurrentDay()] > 0)
        {
            game.data.eventCooldown[CurrentDay()] -= Time.deltaTime;
        }
        else if (data.eventActiveID != 0 & game.data.eventCooldown[CurrentDay()] <= 0)
        {
            CompleteEvent(CurrentDay());
        }

        previousDayChecked = DayOfTheWeek();
    }