package net.mgsx.game.plugins.camera;

import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.PerspectiveCamera;

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.camera.components.CameraComponent;
import net.mgsx.game.plugins.camera.storage.CameraSerializer;
import net.mgsx.game.plugins.camera.systems.CameraSystem;
import net.mgsx.game.plugins.camera.systems.CameraTransformSystem;

@PluginDef(components={
		CameraComponent.class})
public class CameraPlugin implements Plugin
{
	@Override
	public void initialize(GameScreen engine) 
	{
		engine.entityEngine.addSystem(new CameraTransformSystem());
		engine.entityEngine.addSystem(new CameraSystem(engine));
		
		engine.registry.serializers.put(PerspectiveCamera.class, new CameraSerializer());
		engine.registry.serializers.put(OrthographicCamera.class, new CameraSerializer());
	}
	
	
}

@@ -28,24 +28,65 @@
 ns.camera;%0A%0A
+import com.badlogic.gdx.graphics.Camera;%0A
 import com.b
@@ -838,16 +838,89 @@
 e));%0A%09%09%0A
+%09%09engine.registry.serializers.put(Camera.class, new CameraSerializer());%0A
 %09%09engine

fix camera serialization