예제 #1
0
    public void Initialize(int totalLemmings, int minimumLemmings)
    {
        maximum = totalLemmings;
        minimum = minimumLemmings;
        for (int i = 0; i < totalLemmings; i++)
        {
            PlayerProgressUnit unit = Instantiate(fillUnitPrefab, holder);
            units.Add(unit);

            if (i == (totalLemmings - minimum - 1))
            {
                target = Instantiate(fillTargetPrefab, holder);
            }
        }

        Reset();
    }
예제 #2
0
    //Start
    private void Start()
    {
        currentTimer = updateTimer;
        maximum      = LevelController.Instance.CurrentMapSettings.LemmingsCount;
        minimum      = LevelController.Instance.CurrentMapSettings.MinimumVictoryCount;
        targetFill   = localProgressBar.fill;

        for (int i = 0; i < maximum; i++)
        {
            PlayerProgressUnit unit = Instantiate(fillUnitPrefab, holder);
            units.Add(unit);

            if (i == minimum - 1)
            {
                target = Instantiate(fillTargetPrefab, holder);
            }
        }

        Reset();
    }