Example #1
0
    public void AddKills()
    {
        NumberKills++;
        KillBeforeLifeTracker++;

        if (KillBeforeLifeTracker >= NumKillsBeforeLife[killIndex])
        {
            Health.AddLives(1);
            KillBeforeLifeTracker = 0;

            if (killIndex < NumKillsBeforeLife.Length - 1)
            {
                killIndex++;
            }
        }

        if (OnKillAdded != null)
        {
            OnKillAdded();
        }

        GameManager.AddTotalKills();
    }