From eff66477043e40034f13565582d823bc47d891f3 Mon Sep 17 00:00:00 2001 From: Allexit Date: Thu, 9 Apr 2015 00:44:05 +0300 Subject: [PATCH] Component getting is now done properly in RenderingSystem --- .../com/saltosion/gladiator/systems/RenderingSystem.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/com/saltosion/gladiator/systems/RenderingSystem.java b/core/src/com/saltosion/gladiator/systems/RenderingSystem.java index 12987ea..37c5eae 100644 --- a/core/src/com/saltosion/gladiator/systems/RenderingSystem.java +++ b/core/src/com/saltosion/gladiator/systems/RenderingSystem.java @@ -1,5 +1,6 @@ package com.saltosion.gladiator.systems; +import com.badlogic.ashley.core.ComponentMapper; import com.badlogic.ashley.core.Engine; import com.badlogic.ashley.core.Entity; import com.badlogic.ashley.core.EntitySystem; @@ -15,7 +16,9 @@ import com.saltosion.gladiator.components.CPosition; import com.saltosion.gladiator.components.CRenderedObject; public class RenderingSystem extends EntitySystem { - + + private ComponentMapper rom = ComponentMapper.getFor(CRenderedObject.class); + private ComponentMapper pm = ComponentMapper.getFor(CPosition.class); private ImmutableArray entities; private SpriteBatch batch; @@ -44,12 +47,12 @@ public class RenderingSystem extends EntitySystem { batch.begin(); for (int i=0; i