本文整理汇总了Java中org.newdawn.slick.command.Command类的典型用法代码示例。如果您正苦于以下问题:Java Command类的具体用法?Java Command怎么用?Java Command使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Command类属于org.newdawn.slick.command包,在下文中一共展示了Command类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: controlPressed
import org.newdawn.slick.command.Command; //导入依赖的package包/类
@Override
public void controlPressed(Command command) {
LOGGER.debug("com.jed.state.PlayState#controlPressed");
LOGGER.info("controlPressed {}",command.toString());
if(command.equals(new BasicCommand("pauseToggle"))) {
paused = !paused;
} else if(command.equals(new BasicCommand("stepFrame"))) {
if (paused) {
stepFrame = true;
}
} else if(command.getName().equals(BasicCommandConstants.JUMP)) {
currentMap.getPlayer().setJumping(true);
} else if(command.getName().equals(BasicCommandConstants.MOVE_RIGHT)) {
currentMap.getPlayer().setMovingRight(true);
} else if(command.getName().equals(BasicCommandConstants.MOVE_LEFT)) {
currentMap.getPlayer().setMovingLeft(true);
}
}
示例2: controlReleased
import org.newdawn.slick.command.Command; //导入依赖的package包/类
@Override
public void controlReleased(Command command) {
LOGGER.debug("com.jed.state.PlayState#controlReleased");
LOGGER.info("controlReleased {}",command.toString());
if(command.getName().equals(BasicCommandConstants.MOVE_RIGHT)) {
currentMap.getPlayer().setMovingRight(false);
} else if(command.getName().equals(BasicCommandConstants.MOVE_LEFT)) {
currentMap.getPlayer().setMovingLeft(false);
} else if(command.getName().equals("toggleDebugView")) {
isDebugViewEnabled = !isDebugViewEnabled;
currentMap.setDebugViewEnabled(isDebugViewEnabled);
}
}
示例3: controlPressed
import org.newdawn.slick.command.Command; //导入依赖的package包/类
/**
* @see org.newdawn.slick.command.InputProviderListener#controlPressed(org.newdawn.slick.command.Command)
*/
public void controlPressed(Command command) {
message = "Pressed: "+command;
}
示例4: controlReleased
import org.newdawn.slick.command.Command; //导入依赖的package包/类
/**
* @see org.newdawn.slick.command.InputProviderListener#controlReleased(org.newdawn.slick.command.Command)
*/
public void controlReleased(Command command) {
message = "Released: "+command;
}
示例5: controlPressed
import org.newdawn.slick.command.Command; //导入依赖的package包/类
@Override
public void controlPressed(Command command) {
LOGGER.debug("Pressed ",command.toString());
LOGGER.info("Command {}",command.toString());
}
示例6: controlReleased
import org.newdawn.slick.command.Command; //导入依赖的package包/类
@Override
public void controlReleased(Command command) {
LOGGER.debug("Released ",command.toString());
}
示例7: controlPressed
import org.newdawn.slick.command.Command; //导入依赖的package包/类
@Override
public void controlPressed(Command command) throws NotImplementedException {
throw new NotImplementedException(LangConstants.NOT_IMPLEMENTED_YET_MESSAGE);
}
示例8: controlReleased
import org.newdawn.slick.command.Command; //导入依赖的package包/类
@Override
public void controlReleased(Command command) throws NotImplementedException {
throw new NotImplementedException(LangConstants.NOT_IMPLEMENTED_YET_MESSAGE);
}