/// <summary>
        ///     Create and add new Timing Line Object to the Object Pool
        /// </summary>
        /// <param name="info"></param>
        private void CreatePoolObject(TimingLineInfo info)
        {
            var line = new TimingLine(Ruleset, info, ScrollDirection, TrackOffset, SizeX, PositionX);

            line.UpdateSpritePosition(HitObjectManager.CurrentTrackPosition);
            Pool.Enqueue(line);
        }
示例#2
0
        /// <inheritdoc />
        /// <summary>
        ///     Creates and initializes a new Timing Line Object
        /// </summary>
        /// <param name="ruleset"></param>
        /// <param name="info"></param>
        public TimingLine(GameplayRulesetKeys ruleset, TimingLineInfo info)
        {
            var playfield = (GameplayPlayfieldKeys)ruleset.Playfield;

            Ruleset = ruleset;
            Info    = info;

            // Initialize Sprite
            Alignment = Alignment.TopLeft;
            Width     = playfield.Width;
            Height    = 2;
            Parent    = playfield.Stage.TimingLineContainer;
        }
示例#3
0
        /// <inheritdoc />
        /// <summary>
        ///     Creates and initializes a new Timing Line Object
        /// </summary>
        /// <param name="ruleset"></param>
        /// <param name="info"></param>
        public TimingLine(GameplayRulesetKeys ruleset, TimingLineInfo info, ScrollDirection direction, float targetY, float size, float offsetX)
        {
            var playfield = (GameplayPlayfieldKeys)ruleset.Playfield;

            TrackOffset     = targetY;
            Ruleset         = ruleset;
            Info            = info;
            ScrollDirection = direction;

            // Initialize Sprite
            Alignment = Alignment.TopLeft;
            Width     = size;
            X         = offsetX;
            Height    = 2;
            Parent    = playfield.Stage.TimingLineContainer;
            Tint      = SkinManager.Skin.Keys[MapManager.Selected.Value.Mode].TimingLineColor;
        }