public void debugAddEntity(float x, float y) { //Entity newEntity = new [YOUR ENTITY HERE](level, x, y); Entity newEntity = new PreGroundSpeedy(level, x, y); level.addEntity(newEntity.randId, newEntity); //This should just stay the same }
public void speedyEntity(float x, float y) { List <Entity> L1 = level.getCollisionSystem().findObjectsBetweenPoints(x - speedySize / 2, y - speedySize / 2, x + speedySize / 2, y + speedySize / 2); List <Entity> L2 = level.getCollisionSystem().findObjectsBetweenPoints(x - speedySize / 2, y + speedySize / 2, x + speedySize / 2, y - speedySize / 2); L1 = ClearFromList(L1, GlobalVars.SWITCH_COMPONENT_NAME, GlobalVars.CHECKPOINT_COMPONENT_NAME); L2 = ClearFromList(L2, GlobalVars.SWITCH_COMPONENT_NAME, GlobalVars.CHECKPOINT_COMPONENT_NAME); if (L1.Count > 0) { return; } if (L2.Count > 0) { return; } Entity newEntity = new PreGroundSpeedy(level, x, y); level.addEntity(newEntity.randId, newEntity); }
//---------------------------------------------------------------------------------------------- public void speedyEntity(float x, float y) { Entity newEntity = new PreGroundSpeedy(level, x, y); level.addEntity(newEntity.randId, newEntity); }