当前位置: 首页>>代码示例>>Java>>正文


Java Ground类代码示例

本文整理汇总了Java中org.rev317.min.accessors.Ground的典型用法代码示例。如果您正苦于以下问题:Java Ground类的具体用法?Java Ground怎么用?Java Ground使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Ground类属于org.rev317.min.accessors包,在下文中一共展示了Ground类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSceneObjectAtTile

import org.rev317.min.accessors.Ground; //导入依赖的package包/类
private static SceneObject getSceneObjectAtTile(int x, int y) {
    Ground sceneTile = Loader.getClient().getScene().getGroundArray()[Game.getPlane()][x][y];
    if (sceneTile == null) {
        return null;
    }

    final SceneObjectTile[] interactiveObjects = sceneTile.getInteractiveObjects();
    if (interactiveObjects != null) {
        for (final SceneObjectTile interactiveObject : interactiveObjects) {
            if (interactiveObject != null) {
                return new SceneObject(interactiveObject, SceneObject.TYPE_INTERACTIVE);
            }
        }
    }

    SceneObjectTile sceneObjectTile = sceneTile.getWallObject();
    if (sceneObjectTile != null) {
        return new SceneObject(sceneObjectTile, SceneObject.TYPE_WALL);
    }

    return null;
}
 
开发者ID:Parabot,项目名称:Parabot-317-API-Minified-PkHonor,代码行数:23,代码来源:SceneObjects.java

示例2: getSceneObjectsAtTile

import org.rev317.min.accessors.Ground; //导入依赖的package包/类
/**
 * Gets all sceneobjects at a tile
 *
 * @param x
 * @param y
 *
 * @return array of sceneobjects, or null if there aren't any
 */
public static final Collection<SceneObject> getSceneObjectsAtTile(int x, int y) {
    Ground                 sceneTile    = Loader.getClient().getScene().getGroundArray()[Game.getPlane()][x][y];
    ArrayList<SceneObject> sceneObjects = null;
    if (sceneTile != null) {
        final SceneObjectTile[] interactiveObjects = sceneTile.getInteractiveObjects();
        if (interactiveObjects != null) {
            for (final SceneObjectTile interactiveObject : interactiveObjects) {
                if (interactiveObject != null) {
                    if (sceneObjects == null) {
                        sceneObjects = new ArrayList<>();
                    }
                    sceneObjects.add(new SceneObject(interactiveObject, SceneObject.TYPE_INTERACTIVE));
                }
            }
        }
        SceneObjectTile sceneObjectTile = sceneTile.getWallObject();
        if (sceneObjectTile != null) {
            if (sceneObjects == null) {
                sceneObjects = new ArrayList<>();
            }
            sceneObjects.add(new SceneObject(sceneObjectTile, SceneObject.TYPE_WALL));
        }

        sceneObjectTile = sceneTile.getWallDecoration();
        if (sceneObjectTile != null) {
            if (sceneObjects == null) {
                sceneObjects = new ArrayList<>();
            }
            sceneObjects.add(new SceneObject(sceneObjectTile, SceneObject.TYPE_WALLDECORATION));
        }

        sceneObjectTile = sceneTile.getGroundDecoration();
        if (sceneObjectTile != null) {
            if (sceneObjects == null) {
                sceneObjects = new ArrayList<>();
            }
            sceneObjects.add(new SceneObject(sceneObjectTile, SceneObject.TYPE_GROUNDDECORATION));
        }

        sceneObjectTile = sceneTile.getGroundItem();
        if (sceneObjectTile != null) {
            if (sceneObjects == null) {
                sceneObjects = new ArrayList<>();
            }
            sceneObjects.add(new SceneObject(sceneObjectTile, SceneObject.TYPE_GROUNDITEM));
        }
    }

    return sceneObjects;
}
 
开发者ID:Parabot,项目名称:Parabot-317-API-Minified-PkHonor,代码行数:59,代码来源:SceneObjects.java


注:本文中的org.rev317.min.accessors.Ground类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。