/// <summary>The build entity.</summary> /// <param name="entity">The entity.</param> /// <param name="entityWorld">The entityWorld.</param> /// <param name="args">The args.</param> /// <returns>The <see cref="Entity" />.</returns> public Entity BuildEntity(Entity entity, EntityWorld entityWorld, params object[] args) { entity.Group = "EFFECTS"; entity.AddComponentFromPool<TransformComponent>(); entity.AddComponent(new SpatialFormComponent("BulletExplosion")); entity.AddComponent(new ExpiresComponent(1000)); return entity; }
/// <summary>The build entity.</summary> /// <param name="entity">The entity.</param> /// <param name="entityWorld">The entityWorld.</param> /// <param name="args">The args.</param> /// <returns>The <see cref="Entity" />.</returns> public Entity BuildEntity(Entity entity, EntityWorld entityWorld, params object[] args) { entity.Group = "BULLETS"; entity.AddComponentFromPool<TransformComponent>(); entity.AddComponent(new SpatialFormComponent("Missile")); entity.AddComponent(new VelocityComponent()); entity.AddComponent(new ExpiresComponent(2000)); return entity; }
/// <summary>The build entity.</summary> /// <param name="entity">The entity.</param> /// <param name="entityWorld">The entity world.</param> /// <param name="args">The args.</param> /// <returns>The <see cref="Entity" />.</returns> public Entity BuildEntity(Entity entity, EntityWorld entityWorld, params object[] args) { entity.Group = "SHIPS"; entity.AddComponentFromPool<TransformComponent>(); entity.AddComponent(new SpatialFormComponent("EnemyShip")); entity.AddComponent(new HealthComponent(10)); entity.AddComponent(new WeaponComponent()); entity.AddComponent(new EnemyComponent()); entity.AddComponent(new VelocityComponent()); return entity; }