Пример #1
0
    void HandleHaywires()
    {
        if (finishState == null)
        {
            secondsToNextHaywire -= Time.deltaTime;
            if (secondsToNextHaywire <= 0)
            {
                activeHaywires = new HaywireCollection(haywireCount, activeHaywires?.GetAllActiveHaywires());

                player.SetHaywires(activeHaywires);

                haywireSound.Play();

                secondsToNextHaywire = haywireTime;
            }

            secondsToNextHaywireIncrease -= Time.deltaTime;
            if (secondsToNextHaywireIncrease <= 0)
            {
                if (haywireCount < 3)
                {
                    ++haywireCount;
                }

                secondsToNextHaywireIncrease = secondsBetweenHaywireIncreases;
            }
        }
        else
        {
            activeHaywires = new HaywireCollection(0);
            player.SetHaywires(activeHaywires);
        }
    }
Пример #2
0
 public void SetHaywires(HaywireCollection h)
 {
     haywires = h;
 }