Esempio n. 1
0
        internal void AddNewBullet(Point position)
        {
            var bulletRadius = 15;

            position.Offset(-bulletRadius, -bulletRadius);
            var quiz           = ((QuizContent)lessonModel.Exercises.Contents[lessonViewModel.CurrentPageIndex]);
            var bulletPosition = new Layers.Components.Point(position.X, position.Y);
            var bulletIndex    = CurrentLayer.GetLastBulletOffset() + 1;

            quiz.AddBullet(bulletIndex, bulletPosition);

            // Forward the adding to each Layer of the View to update it
            foreach (var layer in Layers)
            {
                layer.Value.AddBullet(bulletIndex, position);
            }
        }