Пример #1
0
        /// <summary>
        /// Sets the onscreen location of FlagContainers.
        /// </summary>
        private void SetFlagLocations()
        {
            float slideOffset = freezeTime <= 0 ? 0 : bezier.GetValue(maxFreezeTime - freezeTime) * (float)flagSpacing;

            for (int i = 0; i < flags.Length; i++)
            {
                FlagContainer c = flags[i];

                if (c == null)
                {
                    continue;
                }

                int offset = currentFlagIndex - i;

                c.SetLocation(currentFlagX + (offset * flagSpacing) - (int)slideOffset, currentFlagY);
            }
        }