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


Java Element.getFloat方法代码示例

本文整理汇总了Java中com.badlogic.gdx.utils.XmlReader.Element.getFloat方法的典型用法代码示例。如果您正苦于以下问题:Java Element.getFloat方法的具体用法?Java Element.getFloat怎么用?Java Element.getFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.utils.XmlReader.Element的用法示例。


在下文中一共展示了Element.getFloat方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	this.radius = actionElement.getInt(XML_ATTRIBUTE_RADIUS, 10);
	this.chanceToMove = actionElement.getInt(XML_ATTRIBUTE_CHANCE_TO_MOVE, 10);
	this.duration = actionElement.getInt(XML_ATTRIBUTE_DURATION, DURATION_INFINITE);
	this.totalTime = actionElement.getFloat(XML_ATTRIBUTE_TOTAL_TIME, 0);
	this.visibleOnly = actionElement.getBoolean(XML_ATTRIBUTE_VISIBLE_ONLY, false);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:9,代码来源:WanderAction.java

示例2: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	this.targetX = actionElement.getFloat(Action.XML_ATTRIBUTE_X, -1);
	if (targetX < 0) {
		throw new GdxRuntimeException("x must be specified for LookAtAction");
	}
	this.targetY = actionElement.getFloat(Action.XML_ATTRIBUTE_Y, -1);
	if (targetY < 0) {
		throw new GdxRuntimeException("y must be specified for LookAtAction");
	}
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:12,代码来源:LookAtAction.java

示例3: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	this.targetX = actionElement.getInt(XML_ATTRIBUTE_X);
	this.targetY = actionElement.getFloat(Action.XML_ATTRIBUTE_Y);
	this.speed = actionElement.getInt(Action.XML_ATTRIBUTE_SPEED);
	this.delay = actionElement.getFloat(Action.XML_ATTRIBUTE_DELAY, 0);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:8,代码来源:TweenToAction.java

示例4: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	state = actionElement.get(XML_ATTRIBUTE_STATE, null);
	if (state == null) {
		throw new GdxRuntimeException("state cannot be null");
	}
	duration = actionElement.getFloat(XML_ATTRIBUTE_DURATION, -1);
	resetState = actionElement.getBoolean(XML_ATTRIBUTE_RESET_STATE, true);
	stateTime = actionElement.getFloat(XML_ATTRIBUTE_STATE_TIME, 0f);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:11,代码来源:PlayStateAnimationAction.java

示例5: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	this.duration = actionElement.getInt(Action.XML_ATTRIBUTE_DURATION);
	this.delay = actionElement.getFloat(Action.XML_ATTRIBUTE_DELAY, 0);
	this.target = actionElement.getFloat(Action.XML_ATTRIBUTE_TARGET, 0);
	this.loop = actionElement.getBoolean(Action.XML_ATTRIBUTE_LOOP, false);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:8,代码来源:FadeAction.java

示例6: loadFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
public void loadFromXML(Element weatherElement) throws IOException {
	currentTemperature = weatherElement.getInt(XML_CURRENT_TEMPERATURE);
	nextPossibleWeatherChange = weatherElement
			.getFloat(XML_NEXT_WEATHER_UPDATE);
	Element element = weatherElement.getChildByName(XML_CURRENT_WEATHER);
	if (element != null) {
		currentWeather = new Weather(element, this);
	} else {
		currentWeather = null;
	}
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:12,代码来源:WeatherManager.java

示例7: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	duration = actionElement.getInt(Action.XML_ATTRIBUTE_DURATION, duration);
	flickDuration = actionElement.getFloat(Action.XML_ATTRIBUTE_FLICK_DURATION, flickDuration);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:6,代码来源:FlickerAction.java

示例8: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	this.duration = actionElement.getFloat(Action.XML_ATTRIBUTE_DURATION, 0);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:5,代码来源:WaitAction.java

示例9: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	this.radius = actionElement.getInt(XML_ATTRIBUTE_RADIUS, 10);
	this.speed = actionElement.getFloat(Action.XML_ATTRIBUTE_SPEED, 10);
	this.duration = actionElement.getInt(Action.XML_ATTRIBUTE_DURATION, -1);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:7,代码来源:WiggleAction.java

示例10: readAndValidateParamateresFromXML

import com.badlogic.gdx.utils.XmlReader.Element; //导入方法依赖的package包/类
@Override
public void readAndValidateParamateresFromXML(Element actionElement) {
	this.chance = actionElement.getInt(XML_ATTRIBUTE_CHANCE_TO_MOVE, 10);
	this.duration = actionElement.getInt(XML_ATTRIBUTE_DURATION, DURATION_INFINITE);
	this.totalTime = actionElement.getFloat(XML_ATTRIBUTE_TOTAL_TIME, 0);
}
 
开发者ID:mganzarcik,项目名称:fabulae,代码行数:7,代码来源:LookAroundAction.java


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