Ejemplo n.º 1
0
 public TurretTemplate(SpriteSheet spriteSheet, DirectorSystem directorSystem, EntityWorld world)
 {
     Turrets.Clear();
     _SpriteSheet = spriteSheet;
     _DirectorSystem = directorSystem;
     _World = world;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Builds all of the entity systems in space world.
        /// </summary>
        protected override void BuildSystems()
        {
            //Update Systems
            gunSystem = this.SystemManager.SetSystem(new GunSystem(), ExecutionType.Update, 0);
            damageSystem = this.SystemManager.SetSystem(new DamageSystem(), ExecutionType.Update, 0);
            bulletRemovalSystem = this.SystemManager.SetSystem(new EntityRemovalSystem(this.Camera), ExecutionType.Update, 0);
            bulletCollisionSystem = this.SystemManager.SetSystem(new BulletCollisionSystem(), ExecutionType.Update, 0);
            healthSystem = this.SystemManager.SetSystem<HealthSystem>(new HealthSystem(), ExecutionType.Update, 0);
            enemySpawnSystem = this.SystemManager.SetSystem(new DirectorSystem(), ExecutionType.Update, 0);
            slowSystem = this.SystemManager.SetSystem(new SlowSystem(), ExecutionType.Update, 0);
            enemyMovementSystem = this.SystemManager.SetSystem(new AISystem(), ExecutionType.Update, 0);
            playerControlSystem = this.SystemManager.SetSystem(new PlayerControlSystem(5f), ExecutionType.Update, 0);
            explosionSystem = this.SystemManager.SetSystem(new ExplosionSystem(), ExecutionType.Update, 0);
            //this.SystemManager.SetSystem(new CrystalMovementSystem(), ExecutionType.Update, 0);
            this.SystemManager.SetSystem(new BaseAnimationSystem(0.10f, 10), ExecutionType.Update, 0);
            scoreSystem = this.SystemManager.SetSystem(new ScoreSystem(this), ExecutionType.Update, 0);
            this.SystemManager.SetSystem(new SmasherBallSystem(), ExecutionType.Update, 0);
            this.SystemManager.SetSystem(new PlayerClampSystem(), ExecutionType.Update, 0);
            this.SystemManager.SetSystem(new FadingTextProcessingSystem(), ExecutionType.Update, 0);

            //Draw Systems
            healthRenderSystem = this.SystemManager.SetSystem<HealthRenderSystem>(new HealthRenderSystem(this.SpriteBatch), ExecutionType.Draw, 1);
            hudRenderSystem = this.SystemManager.SetSystem<HUDRenderSystem>(new HUDRenderSystem(), ExecutionType.Draw, 2);
            starFieldRenderSystem = this.SystemManager.SetSystem<StarFieldRenderSystem>(new StarFieldRenderSystem(SpriteBatch), ExecutionType.Draw, 0);
            this.SystemManager.SetSystem<FadingTextRenderSystem>(new FadingTextRenderSystem(SpriteBatch, ScreenHelper.SpriteFont), ExecutionType.Draw, 1);
            //radarRenderSystem = this.SystemManager.SetSystem<RadarRenderSystem>(new RadarRenderSystem(HUDRenderSystem.RadarScreenLocation,
            //    new Rectangle(-ScreenHelper.Viewport.Width * 2, -ScreenHelper.Viewport.Height * 2,
            //        ScreenHelper.Viewport.Width * 2, ScreenHelper.Viewport.Height * 2)),
            //        ExecutionType.Draw, 3);
            base.BuildSystems();
        }