package net.mgsx.game.plugins.g3d;

import com.badlogic.gdx.graphics.g3d.ModelInstance;

import net.mgsx.game.core.GameScreen;
import net.mgsx.game.core.annotations.PluginDef;
import net.mgsx.game.core.plugins.Plugin;
import net.mgsx.game.plugins.g3d.components.G3DModel;
import net.mgsx.game.plugins.g3d.components.TextureAnimationComponent;
import net.mgsx.game.plugins.g3d.systems.G3DAnimationSystem;
import net.mgsx.game.plugins.g3d.systems.G3DCullingSystem;
import net.mgsx.game.plugins.g3d.systems.G3DLightCullingSystem;
import net.mgsx.game.plugins.g3d.systems.G3DLightNoiseSystem;
import net.mgsx.game.plugins.g3d.systems.G3DRendererSystem;
import net.mgsx.game.plugins.g3d.systems.G3DTextureAnimationSystem;
import net.mgsx.game.plugins.g3d.systems.G3DTransformSystem;

@PluginDef(components={G3DModel.class, TextureAnimationComponent.class})

public class G3DPlugin implements Plugin
{
	@Override
	public void initialize(final GameScreen engine) 
	{
		// serializers
		engine.registry.addSerializer(ModelInstance.class, new ModelInstanceSerializer());
		
		// systems
		
		engine.entityEngine.addSystem(new G3DAnimationSystem());
		engine.entityEngine.addSystem(new G3DTransformSystem());
		engine.entityEngine.addSystem(new G3DCullingSystem(engine));
		engine.entityEngine.addSystem(new G3DRendererSystem(engine));
		engine.entityEngine.addSystem(new G3DTextureAnimationSystem());
		engine.entityEngine.addSystem(new G3DLightCullingSystem(engine));
		engine.entityEngine.addSystem(new G3DLightNoiseSystem());
	}
}

@@ -255,24 +255,284 @@
 ponents.
-G3DModel
+DirectionalLightComponent;%0Aimport net.mgsx.game.plugins.g3d.components.G3DModel;%0Aimport net.mgsx.game.plugins.g3d.components.LightNoiseComponent;%0Aimport net.mgsx.game.plugins.g3d.components.PointLightComponent;%0Aimport net.mgsx.game.plugins.g3d.components.ShadowCasting
 ;%0Aimport
@@ -1055,16 +1055,19 @@
 onents=%7B
+%0A%09%09
 G3DModel
@@ -1074,16 +1074,19 @@
 .class, 
+%0A%09%09
 TextureA
@@ -1108,16 +1108,132 @@
 nt.class
+,%0A%09%09DirectionalLightComponent.class,%0A%09%09LightNoiseComponent.class,%0A%09%09PointLightComponent.class,%0A%09%09ShadowCasting.class
 %7D)%0A%0Apubl

fix missing components references