本文整理汇总了Java中com.badlogic.gdx.utils.IntFloatMap类的典型用法代码示例。如果您正苦于以下问题:Java IntFloatMap类的具体用法?Java IntFloatMap怎么用?Java IntFloatMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntFloatMap类属于com.badlogic.gdx.utils包,在下文中一共展示了IntFloatMap类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: WorldRoom
import com.badlogic.gdx.utils.IntFloatMap; //导入依赖的package包/类
public WorldRoom(Tilemap map) {
this.destroyed = false;
this.prepared = false;
this.events = new EventHelper(this);
this.bodyQueue = new ObjectSet<>();
this.entrypointQueue = new ObjectSet<>();
this.tilemap = map;
this.controller = null;
this.obj = new ObjectSet<>();
this.entrypoints = new ObjectMap<>();
this.opacityMapping = new IntFloatMap();
this.collisionLayers = new ObjectMap<>();
this.renderOrder = new Array<>(true, 16);
this.disabledCollision = new ObjectSet<>();
}
示例2: write
import com.badlogic.gdx.utils.IntFloatMap; //导入依赖的package包/类
public void write (Kryo kryo, Output output, IntFloatMap map) {
int length = map.size;
output.writeVarInt(length, true);
for (Iterator iter = map.iterator(); iter.hasNext();) {
IntFloatMap.Entry entry = (IntFloatMap.Entry)iter.next();
output.writeInt(entry.key);
output.writeFloat(entry.value);
}
}
示例3: read
import com.badlogic.gdx.utils.IntFloatMap; //导入依赖的package包/类
public IntFloatMap read (Kryo kryo, Input input, Class<IntFloatMap> type) {
int length = input.readVarInt(true);
IntFloatMap map = new IntFloatMap(length);
for (int i = 0; i < length; i++) {
int key = input.readInt();
float value = input.readFloat();
map.put(key, value);
}
return map;
}
示例4: getButtonAmount
import com.badlogic.gdx.utils.IntFloatMap; //导入依赖的package包/类
public int getButtonAmount () {
try {
switch (Gdx.app.getType()) {
case Android:
Field androidButtons = ClassReflection
.getDeclaredField(ClassReflection.forName("com.badlogic.gdx.controllers.android.AndroidController"), "buttons");
androidButtons.setAccessible(true);
return ((IntIntMap)androidButtons.get(gamePad)).size;
case Desktop:
Field desktopButtons = ClassReflection.getDeclaredField(
ClassReflection.forName("com.badlogic.gdx.controllers.lwjgl3.Lwjgl3Controller"), "buttonState");
desktopButtons.setAccessible(true);
return ((boolean[])desktopButtons.get(gamePad)).length;
case HeadlessDesktop:
return 0;
case WebGL:
Field gwtButtons = ClassReflection
.getDeclaredField(ClassReflection.forName("com.badlogic.gdx.controllers.gwt.GwtController"), "buttons");
gwtButtons.setAccessible(true);
return ((IntFloatMap)gwtButtons.get(gamePad)).size;
case iOS:
return 0;
default:
break;
}
} catch (Exception ex) {
ex.printStackTrace();
}
return 0;
}
示例5: SoundManager
import com.badlogic.gdx.utils.IntFloatMap; //导入依赖的package包/类
public SoundManager(KyperBoxGame game) {
this.game = game;
tags = new IntFloatMap();
createTag(MASTER_VOLUME);
musics = new ObjectMap<Integer,Array<Music>>();
}