本文整理汇总了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;
}
示例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;
}