Example #1
0
    public void BoxThrown(BoxComponent box)
    {
        boxes.Remove(box);
        weightExcess -= (float)box.mySize;

        if (weightExcess <= 0 && weightProblem)
        {
            weightProblem             = false;
            timeForWeightProblem      = Random.Range(minimumTimePerWeightProblem, maxSecondsPerWeightProblem);
            timePassedInWeightProblem = 0;
            screenEvents.SetKGAlarm(ScreenEvents.State.Solution);
        }
    }