本文整理汇总了Java中com.badlogic.gdx.utils.ObjectMap.Entries类的典型用法代码示例。如果您正苦于以下问题:Java Entries类的具体用法?Java Entries怎么用?Java Entries使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Entries类属于com.badlogic.gdx.utils.ObjectMap包,在下文中一共展示了Entries类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: entries
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
/** Returns an iterator for the entries in the map. Remove is supported. Note that the same iterator instance is returned each
* time this method is called. Use the {@link OrderedMapEntries} constructor for nested or multithreaded iteration. */
public Entries<K, V> entries () {
if (entries1 == null) {
entries1 = new OrderedMapEntries(this);
entries2 = new OrderedMapEntries(this);
}
if (!entries1.valid) {
entries1.reset();
entries1.valid = true;
entries2.valid = false;
return entries1;
}
entries2.reset();
entries2.valid = true;
entries1.valid = false;
return entries2;
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:19,代码来源:OrderedMap.java
示例2: readJsonObject
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void readJsonObject(JsonObject element, OrderedMap<String, Object> jsonData) {
Entries<String, Object> entries = jsonData.entries();
for (Entry<String, Object> entry : entries) {
if (entry.value instanceof OrderedMap) {
JsonObject obj = new JsonObject();
element.elements.put(entry.key, obj);
// unchecked, but safe:
readJsonObject(obj, (OrderedMap<String, Object>) entry.value);
} else if (entry.value instanceof Array) {
JsonArray arr = new JsonArray();
element.elements.put(entry.key, arr);
// unchecked, but safe:
readJsonArray(arr, (Array<OrderedMap<String, Object>>) entry.value);
} else {
element.values.put(entry.key, entry.value.toString());
}
}
}
开发者ID:matheus23,项目名称:RuinsOfRevenge,代码行数:22,代码来源:JsonDOM.java
示例3: checkRequiredAttributes
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
private void checkRequiredAttributes (StackedTask<E> stackedTask) {
// Check the minimum number of children
Entries<String, AttrInfo> entries = stackedTask.metadata.attributes.iterator();
while (entries.hasNext()) {
Entry<String, AttrInfo> entry = entries.next();
if (entry.value.required && !encounteredAttributes.contains(entry.key))
throw stackedTaskException(stackedTask, "missing required attribute '" + entry.key + "'");
}
}
开发者ID:Mignet,项目名称:Inspiration,代码行数:10,代码来源:BehaviorTreeParser.java
示例4: update
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
@Override
public void update(float deltaTime) {
super.update(deltaTime);
if (getMap() != null) {
float gameSeconds = deltaTime * getMap().getGameTimeMultiplier();
float effectDurationDelta = gameSeconds / Configuration.getCombatTurnDurationInGameSeconds();
Array<GameCharacter> pcs = group.getPlayerCharacters();
for (int i = 0; i < pcs.size; ++i) {
GameCharacter character = pcs.get(i);
if (character.isActive()) {
character.updateSurvival(gameSeconds);
}
character.updatePersistentEffects(effectDurationDelta);
}
Entries<GameCharacter, Array<Action>> entries = pcActionsToUpdate.entries();
for (Entry<GameCharacter, Array<Action>> entry : entries) {
Iterator<Action> actions = entry.value.iterator();
while (actions.hasNext()) {
Action action = actions.next();
if (action.isPaused()) {
continue;
}
action.update(deltaTime);
if (action.isFinished()) {
actions.remove();
entry.key.removeAction(action);
}
}
if (entry.value.size < 1) {
entries.remove();
}
}
}
}
开发者ID:mganzarcik,项目名称:fabulae,代码行数:39,代码来源:PlayerCharacterGroupGameObject.java
示例5: read
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
@Override
public void read (Json json, JsonValue jsonData) {
this.name = jsonData.getString("name");
if (jsonData.has("vertexShader")) {
this.individualShaders = true;
this.vertexShader = jsonData.getString("vertexShader");
this.fragmentShader = jsonData.getString("fragmentShader");
Gdx.app.postRunnable(new Runnable() {
@Override
public void run () {
Debug.log("load", Shader.this.fragmentShader);
Shader.this.manager.add(Shader.this.name, RavTech.files.getAssetHandle(vertexShader),
RavTech.files.getAssetHandle(fragmentShader));
}
});
}
String textureString = jsonData.get("textures").toString();
textureString = textureString.substring(textureString.indexOf('{'));
this.textures = json.fromJson(ObjectMap.class, String.class, textureString);
Gdx.app.postRunnable(new Runnable() {
@Override
public void run () {
Entries<String, String> entries = Shader.this.textures.iterator();
while (entries.hasNext) {
Entry<String, String> entry = entries.next();
if (!entry.value.endsWith(".framebuffer") && !RavTech.files.isLoaded(entry.value)) {
RavTech.files.loadAsset(entry.value, Texture.class, true);
((Texture)RavTech.files.getAsset(entry.value, Texture.class)).setFilter(TextureFilter.Linear, TextureFilter.Linear);
}
Shader.this.textures.put(entry.key, entry.value);
}
}
});
}
开发者ID:Quexten,项目名称:RavTech,代码行数:36,代码来源:Shader.java
示例6: apply
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
public void apply () {
int textureId = 1;
Entries<String, String> entries = Shader.this.textures.iterator();
while (entries.hasNext) {
Entry<String, String> entry = entries.next();
if (!entry.value.endsWith(".framebuffer")) {
if (!RavTech.files.isLoaded(entry.value))
continue;
((Texture)RavTech.files.getAsset(entry.value, Texture.class)).bind(textureId);
} else {
String trimmedName = entry.value.substring(0, entry.value.length() - ".framebuffer".length());
if (!RavTech.sceneHandler.shaderManager.containsFB(trimmedName))
continue;
RavTech.sceneHandler.shaderManager.getFBTexture(trimmedName).bind(textureId);
}
if (RavTech.sceneHandler.shaderManager.contains(this.name))
RavTech.sceneHandler.shaderManager.get(this.name).setUniformi(entry.key, textureId);
textureId++;
}
Gdx.gl.glActiveTexture(GL20.GL_TEXTURE0);
}
开发者ID:Quexten,项目名称:RavTech,代码行数:28,代码来源:Shader.java
示例7: toString
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
@Override
public String toString () {
String returnString = String.valueOf(connectionInformation) + "--LobbyDetails--\n";
Entries<String, Object> entries = values.iterator();
while (entries.hasNext) {
Entry<String, Object> entry = entries.next();
returnString = returnString + entry.key + "|" + String.valueOf(entry.value) + "\n";
}
return returnString;
}
开发者ID:Quexten,项目名称:RavTech,代码行数:11,代码来源:LobbyDetails.java
示例8: connected
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
@Override
public void connected (Connection connection) {
Debug.logDebug(LOG_TAG, connection.getRemoteAddressTCP() + " is trying to conntect!");
connection.updateReturnTripTime();
// Return lobby data
Packet.LobbyData lobbyDataPacket = new Packet.LobbyData();
lobbyDataPacket.values = new ObjectMap<String, Object>();
Entries<String, Object> entries = layer.net.lobby.values.iterator();
while (entries.hasNext) {
Entry<String, Object> entry = entries.next();
lobbyDataPacket.values.put(entry.key, entry.value);
}
}
开发者ID:Quexten,项目名称:RavTech,代码行数:15,代码来源:ServerListener.java
示例9: initEnvironment
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
public void initEnvironment(Globals globals) {
ObjectMap<String, Object> environment = this.getEnvironment();
Entries<String, Object> entries = environment.iterator();
while (entries.hasNext) {
Entry<String, Object> entry = entries.next();
globals.set(entry.key, entry.value instanceof LuaValue ? (LuaValue)entry.value : CoerceJavaToLua.coerce(entry.value));
}
}
开发者ID:Quexten,项目名称:RavTech,代码行数:9,代码来源:LuaJScriptLoader.java
示例10: removeComponent
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
public void removeComponent (GameComponent component) {
Animator animator = (Animator)getComponentByType(ComponentType.Animator);
if (component instanceof GameObject)
if (animator != null) {
Entries<String, Animation> iter = animator.animations.iterator();
while (iter.hasNext()) {
Entry<String, Animation> next = iter.next();
next.value.removeComponent(component);
}
}
component.dispose();
components.removeValue(component, true);
}
开发者ID:Quexten,项目名称:RavTech,代码行数:14,代码来源:GameObject.java
示例11: getFrameBuffers
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
public String[] getFrameBuffers () {
String[] frameBufferNames = new String[frameBuffers.size];
Entries<String, FrameBuffer> entries = frameBuffers.iterator();
int i = 0;
while (entries.hasNext) {
Entry<String, FrameBuffer> entry = entries.next();
frameBufferNames[i] = entry.key;
i++;
}
return frameBufferNames;
}
开发者ID:Quexten,项目名称:RavTech,代码行数:12,代码来源:ShaderManager.java
示例12: getRecursively
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
public String getRecursively (FileHandle dir) {
String relativePath = fileAccess.relativizeToAssetsFolder(dir);
for (Entry<String, String> entry : new Entries<>(metadata)) {
if (relativePath.startsWith(entry.key)) {
return entry.value;
}
}
return AssetType.UNKNOWN;
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:10,代码来源:AssetsMetadataModule.java
示例13: getAllRecipes
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
public static Entries<Upgrade, ItemStack[]> getAllRecipes(){
return recipes.entries();
}
开发者ID:Anuken,项目名称:Mindustry,代码行数:4,代码来源:UpgradeRecipes.java
示例14: iterator
import com.badlogic.gdx.utils.ObjectMap.Entries; //导入依赖的package包/类
public Entries<K, V> iterator () {
return entries();
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:4,代码来源:OrderedMap.java
注:本文中的com.badlogic.gdx.utils.ObjectMap.Entries类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论