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


Java Command类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:19,代码来源:PlayState.java

示例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);
    }
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:14,代码来源:PlayState.java

示例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;
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:7,代码来源:InputProviderTest.java

示例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;
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:7,代码来源:InputProviderTest.java

示例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());
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:6,代码来源:LoggableInputProviderListener.java

示例6: controlReleased

import org.newdawn.slick.command.Command; //导入依赖的package包/类
@Override
public void controlReleased(Command command) {
    LOGGER.debug("Released ",command.toString());
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:5,代码来源:LoggableInputProviderListener.java

示例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);

}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:6,代码来源:AbstractInputProviderListener.java

示例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);
}
 
开发者ID:FOShameDotOrg,项目名称:fuzzy-octo-shame,代码行数:5,代码来源:AbstractInputProviderListener.java


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