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


Java IntFloatMap类代码示例

本文整理汇总了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<>();
}
 
开发者ID:Xemiru,项目名称:Undertailor,代码行数:17,代码来源:WorldRoom.java

示例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);
    }
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:10,代码来源:IntFloatMapSerializer.java

示例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;
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:12,代码来源:IntFloatMapSerializer.java

示例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;
}
 
开发者ID:Quexten,项目名称:RavTech,代码行数:31,代码来源:GamePadDevice.java

示例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>>();
}
 
开发者ID:kyperbelt,项目名称:KyperBox,代码行数:7,代码来源:SoundManager.java


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