Example #1
0
 /// <summary>
 /// Initializes the projectile emitter
 /// </summary>
 protected override void Initialize()
 {
     base.Initialize();
     this.projectileManager = this.EntityManager.Find("Projectiles").FindComponent<ProjectileManager>();
 }
Example #2
0
        /// <summary>
        /// Initializes the projectile emitter
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            this.shootPeriod = (1 / this.ShootRate);
            this.delay = this.shootPeriod * this.GunFactor;
            this.toTheNextParticle = double.MaxValue;

            var projectilesEntity = this.EntityManager.Find("Projectiles");
            if (projectilesEntity != null)
            {
                this.projectileManager = projectilesEntity.FindComponent<ProjectileManager>();
            }
        }