Exemplo n.º 1
0
    public void ChoseNextTimeToCheck()
    {
        nextTimeToCheck = null;

        if (timesToCheck == null)
        {
            return;
        }

        if (timesToCheck.Count == 0)
        {
            return;
        }

        foreach (EnemyWaveWithNeededTime elementToCheck in timesToCheck)
        {
            if (nextTimeToCheck == null)
            {
                nextTimeToCheck = elementToCheck;
            }
            else
            {
                if (elementToCheck.GetNeededTime < nextTimeToCheck.GetNeededTime)
                {
                    nextTimeToCheck = elementToCheck;
                }
            }
        }

        if (nextTimeToCheck != null)
        {
            timesToCheck.Remove(nextTimeToCheck);
        }
    }
Exemplo n.º 2
0
    public void AddTimeToCheck(EnemyWaveWithNeededTime timeToCheck)
    {
        if (timesToCheck == null)
        {
            timesToCheck = new List <EnemyWaveWithNeededTime>();
        }

        timesToCheck.Add(timeToCheck);
    }