Пример #1
0
 public static void printEntityDebugInfo(IEntity e, String name) {
   Log.d(
       "Riska",
       ((name != null) ? name : "Entity")
           + ": at ("
           + e.getX()
           + ", "
           + e.getY()
           + ") sized ("
           + e.getWidth()
           + ", "
           + e.getHeight()
           + ")");
 }
Пример #2
0
 @Override
 protected void onChangeValues(
     final float pSecondsElapsed, final IEntity pEntity, final float pX, final float pY) {
   pEntity.setPosition(pEntity.getX() + pX, pEntity.getY() + pY);
 }
Пример #3
0
 public static float rightGlobal(IEntity e) {
   return e.getX() + 0.5f * e.getWidth();
 }
Пример #4
0
 public static float leftGlobal(IEntity e) {
   return e.getX() - 0.5f * e.getWidth();
 }
Пример #5
0
 public static void slideX(IEntity e, float distance) {
   e.setX(e.getX() + distance);
 }
Пример #6
0
 public static float getLeftBoundsX(IEntity e) {
   return getLeftBoundsX(e.getX(), e);
 }