本文整理汇总了Java中com.badlogic.gdx.utils.ObjectSet.remove方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectSet.remove方法的具体用法?Java ObjectSet.remove怎么用?Java ObjectSet.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.utils.ObjectSet
的用法示例。
在下文中一共展示了ObjectSet.remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeGameObject
import com.badlogic.gdx.utils.ObjectSet; //导入方法依赖的package包/类
/**
* Removes the supplied GameObject from this map.
*
* The GO will no longer be rendered.
*
* @param go
*/
public void removeGameObject(GameObject go) {
gameObjects.removeValue(go, false);
if (go instanceof Drawable) {
removeDrawable((Drawable)go);
}
if (go instanceof TextDrawer) {
textDrawers.removeValue((TextDrawer)go, false);
}
if (go instanceof TileBlocker) {
blockers.removeValue((TileBlocker)go, false);
}
if (gameObjectsByType.containsKey(go.getType())) {
gameObjectsByType.get(go.getType()).removeValue(go, false);
}
if (gameObjectsByClass.containsKey(go.getClass())) {
gameObjectsByClass.get(go.getClass()).removeValue(go, false);
}
if (gameObjectTileMap != null) {
for (ObjectSet<GameObject> objects : gameObjectTileMap) {
objects.remove(go);
}
}
}
示例2: getAllCharactersInArea
import com.badlogic.gdx.utils.ObjectSet; //导入方法依赖的package包/类
/**
* Returns an array of all characters in the supplied area that fulfill the supplied filters requirements.
*
* @param returnValue - the set into which to store the result. Can be null. In that case, only true / false will be returned
* indicating whether any characters were found
* @param filters - an array of filters that the characters must fulfill. Can be empty.
* @return true if any characters were found, false otherwise
*/
private boolean getAllCharactersInArea(ObjectSet<AbstractGameCharacter> returnValue, PositionArray area, CharacterFilter... filters) {
if (area == null) {
return false;
}
if (returnValue == null) {
tempSet.clear();
}
ObjectSet<AbstractGameCharacter> setToUse = returnValue != null ? returnValue : tempSet;
if (!getMap().getAllObjectsInArea(setToUse, area, AbstractGameCharacter.class)) {
return false;
}
setToUse.remove(this);
if (filters.length > 0) {
Iterator<AbstractGameCharacter> iterator = setToUse.iterator();
while (iterator.hasNext()) {
AbstractGameCharacter go = iterator.next();
for (CharacterFilter filter : filters) {
if (filter.shouldFilter(this, go)) {
iterator.remove();
break;
}
}
}
}
return setToUse.size > 0;
}
示例3: removeScheduledAssets
import com.badlogic.gdx.utils.ObjectSet; //导入方法依赖的package包/类
@Override
public void removeScheduledAssets(final ObjectSet<String> scheduledAssets) {
for (final String assetPath : assetPaths) {
scheduledAssets.remove(assetPath);
}
}
示例4: removeScheduledAssets
import com.badlogic.gdx.utils.ObjectSet; //导入方法依赖的package包/类
@Override
public void removeScheduledAssets(final ObjectSet<String> scheduledAssets) {
scheduledAssets.remove(assetPath);
}