本文整理汇总了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);
}
示例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");
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}