com.badlogic.gdx.scenes.scene2d.Actor.isAscendantOf()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.Actor.isAscendantOf()方法的一些代码示例,展示了Actor.isAscendantOf()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Actor.isAscendantOf()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Actor
类名称:Actor
方法名:isAscendantOf

Actor.isAscendantOf介绍

[英]Returns true if this actor is the same as or is the ascendant of the specified actor.
[中]

代码示例

代码示例来源:origin: libgdx/libgdx

for (int i = 0, n = targets.size; i < n; i++) {
  Target target = targets.get(i);
  if (!target.actor.isAscendantOf(hit)) continue;
  newTarget = target;
  target.actor.stageToLocalCoordinates(tmpVector.set(stageX, stageY));

代码示例来源:origin: libgdx/libgdx

for (int i = 0, n = targets.size; i < n; i++) {
  Target target = targets.get(i);
  if (!target.actor.isAscendantOf(hit)) continue;
  newTarget = target;
  target.actor.stageToLocalCoordinates(tmpVector.set(stageX, stageY));

代码示例来源:origin: kotcrab/vis-ui

@Override
public boolean onEnd (final Draggable draggable, final Actor actor, final float stageX, final float stageY) {
  if (actor == null || actor.getStage() == null) {
    return CANCEL;
  }
  final Actor overActor = actor.getStage().hit(stageX, stageY, true);
  if (overActor == null || overActor == actor) {
    return CANCEL;
  } else if (overActor.isAscendantOf(actor)) {
    final DragPane dragPane = getDragPane(actor);
    if (dragPane != null && dragPane.isFloating()) {
      DRAG_POSITION.set(stageX, stageY);
      return addToFloatingGroup(draggable, actor, dragPane);
    }
    return CANCEL;
  }
  DRAG_POSITION.set(stageX, stageY);
  if (overActor instanceof DragPane) {
    return addDirectlyToPane(draggable, actor, (DragPane) overActor);
  }
  final DragPane dragPane = getDragPane(overActor);
  if (accept(actor, dragPane)) {
    return addActor(draggable, actor, overActor, dragPane);
  }
  return CANCEL;
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

for (int i = 0, n = targets.size; i < n; i++) {
  Target target = targets.get(i);
  if (!target.actor.isAscendantOf(hit)) continue;
  newTarget = target;
  target.actor.stageToLocalCoordinates(tmpVector.set(stageX, stageY));

相关文章