@@ -0,0 +1,1491 @@
+package com.temporal;%0A%0Aimport ashley.core.Entity;%0Aimport ashley.core.Engine;%0Aimport ashley.core.Family;%0Aimport ashley.core.EntitySystem;%0Aimport ashley.core.EntityListener;%0Aimport ashley.utils.IntMap;%0A%0Apublic class ControlSystem%0A%7B%0A%09public void processEntity (Entity entity, float deltaTime)%0A%09%7B%0A%09%09Position position = entity.getComponent(Position.class);%0A%09%09Velocity velocity = entity.getComponent(Velocity.class);%0A%09%09%0A%09%09velocity.x = 0;%0A%09%09velocity.y = 0;%0A%09%09%0A        if (Gdx.input.isKeyPressed(Keys.LEFT) %7C%7C Gdx.input.isKeyPressed(Keys.A))%0A        %7B%0A            velocity.x = -1;%0A        %7D%0A%0A        if (Gdx.input.isKeyPressed(Keys.RIGHT) %7C%7C Gdx.input.isKeyPressed(Keys.D))%0A        %7B%0A            player.x = 1;%0A        %7D%0A%0A        if (Gdx.input.isKeyPressed(Keys.UP) %7C%7C Gdx.input.isKeyPressed(Keys.W))%0A        %7B%0A            player.y = 1;%0A        %7D%0A%0A        if (Gdx.input.isKeyPressed(Keys.DOWN) %7C%7C Gdx.input.isKeyPressed(Keys.S))%0A        %7B%0A            player.y = -1;%0A        %7D%0A%09%09%0A%09%09if (Gdx.input.isTouched())%0A%09%09%7B%0A%09%09%09%0A%09%09%0A%09%09int mousex = Gdx.input.getX();%0A%09%09int mousey = Gdx.input.getY();%0A%09%09double deltax = mousex - position.x;%0A%09%09double deltay = mousey - position.y;%0A%09%09double length = Math.sqrt(deltax * deltax + deltay * deltay);%0A%09%09deltax /= length;%0A%09%09deltay /= length;%0A%09%09%0A%09%09deltax *= 3;%0A%09%09deltay *= 3;%0A%09%09Entity bullet = new Entity();%0A%09%09Position bulletPos = new Position(position.x, position.y);%0A%09%09bullet.add(bulletPos);%0A%09%09Velocity bulletVel = new Velocity(deltax, deltay);%0A%09%09bullet.add(bulletVel);%0A%09%7D%0A%7D

Add ControlSystem