protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
 {
     entity.Transform.Position = parameters.Get<Vector2>(0);
     entity.AddFromPool<CDrop>().Initialize(DropType.BlackBox);
     entity.AddFromPool<CLifeTime>().Initialize(100f);
     entity.Tag = EntityTags.Drop;
 }
 protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
 {
     entity.Transform.Position = parameters.Get<Vector2>(0);
     entity.AddFromPool<CDrop>().Initialize(DropType.Weapon);
     entity.AddFromPool<CWeaponDrop>().Initialize(parameters.Get<WeaponType>(1));
     entity.AddFromPool<CLifeTime>().Initialize(WeaponDropPrefab.LifeTime);
     entity.Tag = EntityTags.Drop;
 }
 protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
 {
     entity.Transform.Position = parameters.Get<Vector2>(0);
     entity.AddFromPool<CRusherZombieAI>();
     entity.AddFromPool<CZombieInfo>().Initialize(ZombieType.Rusher, RusherZombiePrefab.Size);
     entity.AddFromPool<CHealth>().Initialize(10);
     entity.Tag = EntityTags.Zombie;
 }
        // todo: instead of doing something like this, how about make a callback "OnCollided(Entity entity (or Vector2 position tms))" and then the weapon itself (whos callback it will be calling) decides the damage etc. this.. could be A LOT better!
        protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
        {
            const float Speed = SkypieaConstants.PixelsPerMeter * 25;
            CTransform2D transform = parameters.Get<CTransform2D>(0);

            entity.Transform.Position = transform.Position;
            entity.Transform.Rotation = transform.Rotation;

            entity.AddFromPool<CBullet>().Initialize(RocketLauncherBulletPrefab.BulletSize, parameters.Get<RocketLauncher>(1));
            entity.AddFromPool<CVelocity2D>().Initialize(FlaiMath.GetAngleVector(transform.Rotation), Speed);
            entity.AddFromPool<CParticleEmitter2D>().Initialize(ParticleEffectID.RocketSmoke, new BurstTriggerController(0.01f, entity.Transform));
        }
        protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
        {
            CTransform2D transform = parameters.Get<CTransform2D>(0);
            BulletWeapon weapon = parameters.Get<BulletWeapon>(1);
            float angleOffset = parameters.GetOrDefault<float>(2);
            float speed = parameters.GetOrDefault<float>(3, DefaultSpeed);

            entity.Transform.Position = transform.Position;
            entity.Transform.Rotation = transform.Rotation + angleOffset;

            entity.AddFromPool<CBullet>().Initialize(NormalBulletPrefab.BulletSize, weapon);
            entity.AddFromPool<CVelocity2D>().Initialize(FlaiMath.GetAngleVector(entity.Transform.Rotation), speed);
        }
        protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
        {
            const float Speed = SkypieaConstants.PixelsPerMeter * 20;
            CTransform2D transform = parameters.Get<CTransform2D>(0);
            float rotationOffset = parameters.GetOrDefault<float>(2);

            entity.Transform.Position = transform.Position;
            entity.Transform.Rotation = transform.Rotation;

            entity.AddFromPool<CBullet>().Initialize(BouncerBulletPrefab.BulletSize, parameters.Get<Bouncer>(1));
            entity.AddFromPool<CVelocity2D>().Initialize(FlaiMath.GetAngleVector(transform.Rotation + rotationOffset), Speed);
            entity.AddFromPool<CRotater2D>().Initialize(BouncerBulletPrefab.RotationAmount);
            entity.AddFromPool<CBouncerBullet>().Initialize(3);
        }
        protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
        {
            const float MaxAngleOffset = 0.3f;
            const float Speed = SkypieaConstants.PixelsPerMeter * 14.25f;

            CTransform2D transform = parameters.Get<CTransform2D>(0);
            BulletWeapon weapon = parameters.Get<BulletWeapon>(1);
            float angleOffset = Global.Random.NextFloat(-MaxAngleOffset, MaxAngleOffset);

            entity.Transform.Position = transform.Position;
            entity.Transform.Rotation = transform.Rotation + angleOffset;

            entity.AddFromPool<CBullet>().Initialize(FlamethrowerBulletPrefab.BulletSize, weapon);
            entity.AddFromPool<CVelocity2D>().Initialize(FlaiMath.GetAngleVector(entity.Transform.Rotation), Speed);
            entity.AddFromPool<CLifeTime>().Initialize(0.5f);
        }
        protected override void BuildEntity(EntityWorld entityWorld, Entity entity, ParameterCollection parameters)
        {
            entity.Transform.Position = parameters.Get<Vector2>(0);
            entity.AddFromPool<CGoldenGoblinAI>().Initialize(entity.Transform.Position);
            entity.AddFromPool<CZombieInfo>().Initialize(ZombieType.GoldenGoblin, GoldenGoblinPrefab.Size);
            entity.AddFromPool<CHealth>().Initialize(125);
            entity.AddFromPool<CParticleEmitter2D>().Initialize(ParticleEffectID.GoldenGoblinPath, new BurstTriggerController(0.025f, entity.Transform));

            // okay.. awful... entities can have only one component of a single type so I must create a child entity...
            // another option would be "CMultiParticleEmitter2D" tms
            Entity childEntity = entityWorld.CreateEntity();
            childEntity.AddFromPool<CParticleEmitter2D>().Initialize(ParticleEffectID.GoldenGoblinSpray, new BurstTriggerController(0.1f, entity.Transform));
            entity.AttachChild(childEntity);

            entity.Tag = EntityTags.Zombie;
        }