Ejemplo n.º 1
0
        public override AbstractFiringPattern Exec()
        {
            double i = 1;

            while (i < 360)
            {
                BulletModel bullet = MainContent.ModelFactory.BuildEnemyBulletModel(texture, start, stop, fromModel.GetLocation(), fromModel);
                bullet.SetOrbitAngle(i);
                bullet.SetOrbitRadius(radius);
                bullet.SetSourceModel(fromModel);
                bullet.SetOrbitSpeed(speed);
                int tag = fromModel.GetHashCode() + "static".GetHashCode();
                bullet.SetTag(tag);
                MainContent.Events.AddScheduledTaggedEvent(start, stop, tag, () => bullet.MoveOrbit());
                i += density;

                scheduledEvents.Add(new GameEvents.Event(start, stop, bullet));
            }
            return(this);
        }