Tabnine Logo
GdxAI.getLogger
Code IndexAdd Tabnine to your IDE (free)

How to use
getLogger
method
in
com.badlogic.gdx.ai.GdxAI

Best Java code snippets using com.badlogic.gdx.ai.GdxAI.getLogger (Showing top 20 results out of 315)

origin: libgdx/gdx-ai

@Override
protected void startLine (int indent) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG, lineNumber + ": <" + indent + ">");
  this.indent = indent;
}
origin: libgdx/gdx-ai

@Override
public boolean finalizeSearch (long timeToRun) {
  hpfRequest.pathFound = pathFound;
  if (pathFound) {
    // Take the first move of this plan and use it for the next run through
    endNode = resultPath.get(1);
  }
  if (DEBUG) GdxAI.getLogger().debug(TAG, "LevelPathFinder finalizeSearch; status: " + status);
  return true;
}
origin: libgdx/gdx-ai

@Override
public boolean search (PathFinder<N> pathFinder, long timeToRun) {
  if (DEBUG) GdxAI.getLogger().debug(TAG, "LevelPathFinder search; status: " + status);
  return super.search(pathFinder, timeToRun);
}
origin: libgdx/gdx-ai

@Override
protected void startStatement (String name, boolean isSubtreeReference, boolean isGuard) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG, (isGuard? " guard" : " task") + " name '" + name + "'");
  
  this.isSubtreeRef = isSubtreeReference;
  
  this.statement = isSubtreeReference ? Statement.TreeTask : checkStatement(name);
  if (isGuard) {
    if (statement != Statement.TreeTask)
      throw new GdxRuntimeException(name + ": only tree's tasks can be guarded");
  }
  statement.enter(this, name, isGuard);
}
origin: libgdx/gdx-ai

  + maxVerticalVelocity * maxVerticalVelocity);
float time = (-maxVerticalVelocity + sqrtTerm) / g;
if (DEBUG_ENABLED) GdxAI.getLogger().info("Jump", "1st jump time = " + time);
  if (DEBUG_ENABLED) GdxAI.getLogger().info("Jump", "2nd jump time = " + time);
  if (!checkAirborneTimeAndCalculateVelocity(outVelocity, time, jumpDescriptor, maxLinearSpeed)) {
    return -1f; // Unachievable jump
origin: libgdx/gdx-ai

@Override
public boolean search (PathFinderRequest<N> request, long timeToRun) {
  if (DEBUG) GdxAI.getLogger().debug(TAG, "Enter interruptible HPF; request.status = " + request.status);
    if (DEBUG) GdxAI.getLogger().debug(TAG, "-- statusChanged");
  if (DEBUG) GdxAI.getLogger().debug(TAG, "-- before exit");
origin: libgdx/gdx-ai

@Override
protected void attribute (String name, Object value) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG, lineNumber + ": attribute '" + name + " : " + value + "'");
  
  boolean validAttribute = statement.attribute(this, name, value);
  if (!validAttribute) {
    if (statement == Statement.TreeTask) {
      throw stackedTaskException(getCurrentTask(), "unknown attribute '" + name + "'");
    } else {
      throw new GdxRuntimeException(statement.name + ": unknown attribute '" + name + "'");
    }
  }
}
origin: libgdx/gdx-ai

  if (debugEnabled) GdxAI.getLogger().info(LOG_TAG, "Message " + telegram.message + " not handled");
if (debugEnabled && handledCount == 0) GdxAI.getLogger().info(LOG_TAG, "Message " + telegram.message + " not handled");
origin: libgdx/gdx-ai

GdxAI.getLogger().info(
  LOG_TAG,
  "Instant telegram dispatched at time: " + currentTime + " by " + sender + " for " + receiver
  GdxAI.getLogger().info(
    LOG_TAG,
    "Delayed telegram from " + sender + " for " + receiver + " recorded at time " + currentTime
      + ". Message code is " + msg);
else
  GdxAI.getLogger().info(LOG_TAG,
    "Delayed telegram from " + sender + " for " + receiver + " rejected by the queue. Message code is " + msg);
origin: libgdx/gdx-ai

outer:
if (stringIsUnquoted) {
  if (debug) GdxAI.getLogger().info(LOG_TAG, "string: " + attrName + "=" + value);
  if (value.equals("true")) {
    if (debug) GdxAI.getLogger().info(LOG_TAG, "boolean: " + attrName + "=true");
    attribute(attrName, Boolean.TRUE);
    break outer;
  } else if (value.equals("false")) {
    if (debug) GdxAI.getLogger().info(LOG_TAG, "boolean: " + attrName + "=false");
    attribute(attrName, Boolean.FALSE);
    break outer;
    try {
      if (containsFloatingPointCharacters(value)) {
        if (debug) GdxAI.getLogger().info(LOG_TAG, "double: " + attrName + "=" + Double.parseDouble(value));
        attribute(attrName, new Double(value));
        break outer;
      } else {
        if (debug) GdxAI.getLogger().info(LOG_TAG, "double: " + attrName + "=" + Double.parseDouble(value));
        attribute(attrName, new Long(value));
        break outer;
  if (debug) GdxAI.getLogger().info(LOG_TAG, "string: " + attrName + "=\"" + value + "\"");
  attribute(attrName, value);
if (debug) GdxAI.getLogger().info(LOG_TAG, "unquotedChars");
s = p;
needsUnescape = false;
origin: libgdx/gdx-ai

/** Dispatches any delayed telegrams with a timestamp that has expired. Dispatched telegrams are removed from the queue.
 * <p>
 * This method must be called regularly from inside the main game loop to facilitate the correct and timely dispatch of any
 * delayed messages. Notice that the message dispatcher internally calls {@link Timepiece#getTime()
 * GdxAI.getTimepiece().getTime()} to get the current AI time and properly dispatch delayed messages. This means that
 * <ul>
 * <li>if you forget to {@link Timepiece#update(float) update the timepiece} the delayed messages won't be dispatched.</li>
 * <li>ideally the timepiece should be updated before the message dispatcher.</li>
 * </ul> */
public void update () {
  float currentTime = GdxAI.getTimepiece().getTime();
  // Peek at the queue to see if any telegrams need dispatching.
  // Remove all telegrams from the front of the queue that have gone
  // past their time stamp.
  Telegram telegram;
  while ((telegram = queue.peek()) != null) {
    // Exit loop if the telegram is in the future
    if (telegram.getTimestamp() > currentTime) break;
    if (debugEnabled) {
      GdxAI.getLogger().info(LOG_TAG,
        "Queued telegram ready for dispatch: Sent to " + telegram.receiver + ". Message code is " + telegram.message);
    }
    // Send the telegram to the recipient
    discharge(telegram);
    // Remove it from the queue
    queue.poll();
  }
}
origin: libgdx/gdx-ai

@Override
public SteeringAcceleration<T> calculateRealSteering (SteeringAcceleration<T> steering) {
  // Check if we have a trajectory, and create one if not.
  if (target == null) {
    target = calculateTarget();
    callback.reportAchievability(isJumpAchievable);
  }
  // If the trajectory is zero, return no steering acceleration
  if (!isJumpAchievable) return steering.setZero();
  // Check if the owner has reached target position and velocity with acceptable tolerance
  if (owner.getPosition().epsilonEquals(target.getPosition(), takeoffPositionTolerance)) {
    if (DEBUG_ENABLED) GdxAI.getLogger().info("Jump", "Good position!!!");
    if (owner.getLinearVelocity().epsilonEquals(target.getLinearVelocity(), takeoffVelocityTolerance)) {
      if (DEBUG_ENABLED) GdxAI.getLogger().info("Jump", "Good Velocity!!!");
      isJumpAchievable = false;
      // Perform the jump, and return no steering (the owner is airborne, no need to steer).
      callback.takeoff(maxVerticalVelocity, airborneTime);
      return steering.setZero();
    } else {
      if (DEBUG_ENABLED)
        GdxAI.getLogger().info("Jump",
          "Bad Velocity: Speed diff. = "
            + planarVelocity.set(target.getLinearVelocity()).sub(owner.getLinearVelocity()).len() + ", diff = ("
            + planarVelocity + ")");
    }
  }
  // Delegate to MatchVelocity
  return super.calculateRealSteering(steering);
}
origin: libgdx/gdx-ai

private boolean checkAirborneTimeAndCalculateVelocity (T outVelocity, float time, JumpDescriptor<T> jumpDescriptor,
  float maxLinearSpeed) {
  // Calculate the planar velocity
  planarVelocity.set(jumpDescriptor.delta).scl(1f / time);
  gravityComponentHandler.setComponent(planarVelocity, 0f);
  // Check the planar linear speed
  if (planarVelocity.len2() < maxLinearSpeed * maxLinearSpeed) {
    // We have a valid solution, so store it by merging vertical and non-vertical axes
    float verticalValue = gravityComponentHandler.getComponent(outVelocity);
    gravityComponentHandler.setComponent(outVelocity.set(planarVelocity), verticalValue);
    if (DEBUG_ENABLED)
      GdxAI.getLogger().info("Jump", "targetLinearVelocity = " + outVelocity + "; targetLinearSpeed = " + outVelocity.len());
    return true;
  }
  return false;
}
origin: libgdx/gdx-ai

if (DEBUG) GdxAI.getLogger().debug(TAG, "LevelPathFinder initializeSearch");
levelOfNodes = currentLevel;
currentLevel--;
origin: com.github.almasb/fxgl-ai

@Override
protected void startLine (int indent) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG + lineNumber + ": <" + indent + ">");
  this.indent = indent;
}
origin: com.badlogicgames.gdx/gdx-ai

@Override
protected void startLine (int indent) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG, lineNumber + ": <" + indent + ">");
  this.indent = indent;
}
origin: com.badlogicgames.gdx/gdx-ai

@Override
public boolean finalizeSearch (long timeToRun) {
  hpfRequest.pathFound = pathFound;
  if (pathFound) {
    // Take the first move of this plan and use it for the next run through
    endNode = resultPath.get(1);
  }
  if (DEBUG) GdxAI.getLogger().debug(TAG, "LevelPathFinder finalizeSearch; status: " + status);
  return true;
}
origin: com.github.almasb/fxgl-ai

@Override
protected void startStatement (String name, boolean isSubtreeReference, boolean isGuard) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG + (isGuard? " guard" : " task") + " name '" + name + "'");
  
  this.isSubtreeRef = isSubtreeReference;
  
  this.statement = isSubtreeReference ? Statement.TreeTask : checkStatement(name);
  if (isGuard) {
    if (statement != Statement.TreeTask)
      throw new RuntimeException(name + ": only tree's tasks can be guarded");
  }
  statement.enter(this, name, isGuard);
}
origin: com.badlogicgames.gdx/gdx-ai

@Override
protected void startStatement (String name, boolean isSubtreeReference, boolean isGuard) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG, (isGuard? " guard" : " task") + " name '" + name + "'");
  
  this.isSubtreeRef = isSubtreeReference;
  
  this.statement = isSubtreeReference ? Statement.TreeTask : checkStatement(name);
  if (isGuard) {
    if (statement != Statement.TreeTask)
      throw new GdxRuntimeException(name + ": only tree's tasks can be guarded");
  }
  statement.enter(this, name, isGuard);
}
origin: com.badlogicgames.gdx/gdx-ai

@Override
protected void attribute (String name, Object value) {
  if (btParser.debugLevel > BehaviorTreeParser.DEBUG_LOW)
    GdxAI.getLogger().debug(TAG, lineNumber + ": attribute '" + name + " : " + value + "'");
  
  boolean validAttribute = statement.attribute(this, name, value);
  if (!validAttribute) {
    if (statement == Statement.TreeTask) {
      throw stackedTaskException(getCurrentTask(), "unknown attribute '" + name + "'");
    } else {
      throw new GdxRuntimeException(statement.name + ": unknown attribute '" + name + "'");
    }
  }
}
com.badlogic.gdx.aiGdxAIgetLogger

Popular methods of GdxAI

  • getTimepiece
    Returns the timepiece service.
  • getFileSystem
    Returns the filesystem service.

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getExternalFilesDir (Context)
  • getSystemService (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Collectors (java.util.stream)
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JList (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now