package game;

import java.awt.Graphics2D;

public class Entity extends SimulationBody
{
	public String texturename;
	
	public Entity()
	{
		super();
	}
	
	@Override
	public void render(Graphics2D g2d, double scale)
	{
		g2d.drawImage(Game.tl.textureFromName(this.texturename), 0, 0, null, null);
	}
	
	public void setTextureName(String t)
	{
		texturename = t;
	}
}

@@ -35,16 +35,54 @@
 phics2D;
+%0Aimport java.awt.geom.AffineTransform;
 %0A%0Apublic
@@ -250,16 +250,414 @@
 ale)%0A%09%7B%0A
+%09%09// save the original transform%0A%09%09AffineTransform ot = g2d.getTransform();%0A%09%09%0A%09%09// transform the coordinate system from world coordinates to local coordinates%0A%09%09AffineTransform lt = new AffineTransform();%0A%09%09lt.translate(this.transform.getTranslationX() * scale, this.transform.getTranslationY() * scale);%0A%09%09lt.rotate(this.transform.getRotation());%0A%09%09%0A%09%09// apply the transform%0A%09%09g2d.transform(lt);%0A
 %09%09g2d.dr
@@ -726,16 +726,40 @@
  null);%0A
+%09%09g2d.setTransform(ot);%0A
 %09%7D%0A%09%0A%09pu

Load textures