package net.mgsx.game.plugins.core.components;

import com.badlogic.ashley.core.Component;
import com.badlogic.ashley.core.ComponentMapper;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Vector3;

import net.mgsx.game.core.annotations.Editable;
import net.mgsx.game.core.annotations.EditableComponent;
import net.mgsx.game.core.annotations.Storable;

@Storable("3d")
@EditableComponent
public class Transform3DComponent implements Component
{
	
	public final static ComponentMapper<Transform3DComponent> components = ComponentMapper
			.getFor(Transform3DComponent.class);
	
	@Editable public Vector3 position = new Vector3();
	@Editable public Quaternion rotation = new Quaternion();
}

@@ -133,16 +133,56 @@
 Mapper;%0A
+import com.badlogic.ashley.core.Engine;%0A
 import c
@@ -251,16 +251,61 @@
 Vector3;
+%0Aimport com.badlogic.gdx.utils.Pool.Poolable;
 %0A%0Aimport
@@ -450,16 +450,65 @@
 torable;
+%0Aimport net.mgsx.game.core.components.Duplicable;
 %0A%0A@Stora
@@ -590,16 +590,38 @@
 omponent
+, Duplicable, Poolable
 %0A%7B%0A%09%0A%09pu
@@ -857,10 +857,314 @@
 nion();%0A
+%09%0A%09@Override%0A%09public void reset() %7B%0A%09%09position.setZero();%0A%09%09rotation.idt();%0A%09%09%0A%09%7D%0A%09@Override%0A%09public Component duplicate(Engine engine) %7B%0A%09%09Transform3DComponent clone = engine.createComponent(Transform3DComponent.class);%0A%09%09clone.position.set(position);%0A%09%09clone.rotation.set(rotation);%0A%09%09return clone;%0A%09%7D%0A
 %7D%0A

fix storage for transform 3D component