Ejemplo n.º 1
0
        protected override void OnRender(DrawingContext dc)
        {
            if (Replay == null)
            {
                dc.DrawText(Text("Error"), new Point(10, 10));
            }
            else
            {
                dc.DrawText(Text($"Replay {TimePoint}"), new Point(10, 10));

                var block        = Replay.GetBlockData(TimePoint);
                var relativeTime = TimePoint.RelativeTo(block.BaseRange);
                foreach (var character in block.Characters)
                {
                    RenderCharacter(dc, relativeTime, character);
                }

                foreach (var turret in block.Turrets)
                {
                    RenderTurret(dc, relativeTime, turret);
                }
            }
        }