本文整理汇总了Java中org.newdawn.slick.Input.KEY_SPACE属性的典型用法代码示例。如果您正苦于以下问题:Java Input.KEY_SPACE属性的具体用法?Java Input.KEY_SPACE怎么用?Java Input.KEY_SPACE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.newdawn.slick.Input
的用法示例。
在下文中一共展示了Input.KEY_SPACE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
count++;
if (key == Input.KEY_SPACE) {
if (input.isKeyRepeatEnabled()) {
input.disableKeyRepeat();
} else {
input.enableKeyRepeat(300,100);
}
}
}
示例2: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
if (key == Input.KEY_ESCAPE) {
System.exit(0);
}
if (key == Input.KEY_SPACE) {
visible = !visible;
}
}
示例3: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
if (key == Input.KEY_SPACE) {
flash = !flash;
}
if (key == Input.KEY_ESCAPE) {
container.exit();
}
}
示例4: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
if (key == Input.KEY_SPACE) {
if (image == gif) {
image = tga;
} else {
image = gif;
}
}
}
示例5: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
if (key == Input.KEY_SPACE) {
if (music.playing()) {
music.pause();
} else {
music.resume();
}
}
if (key == Input.KEY_RIGHT) {
music.setPosition(music.getPosition()+5);
}
}
示例6: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
if (key == Input.KEY_ESCAPE) {
container.exit();
}
if (key == Input.KEY_SPACE) {
limited.restart();
}
}
示例7: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
if (key == Input.KEY_ESCAPE) {
System.exit(0);
}
if (key == Input.KEY_SPACE) {
mode = ParticleSystem.BLEND_ADDITIVE == mode ? ParticleSystem.BLEND_COMBINE : ParticleSystem.BLEND_ADDITIVE;
system.setBlendingMode(mode);
}
}
示例8: keyPressed
/**
* @see org.newdawn.slick.BasicGame#keyPressed(int, char)
*/
public void keyPressed(int key, char c) {
if (key == Input.KEY_ESCAPE) {
System.exit(0);
}
if (key == Input.KEY_SPACE) {
sound.play();
}
if (key == Input.KEY_B) {
burp.play();
}
if (key == Input.KEY_A) {
sound.playAt(-1, 0, 0);
}
if (key == Input.KEY_L) {
sound.playAt(1, 0, 0);
}
if (key == Input.KEY_RETURN) {
charlie.play(1.0f,1.0f);
}
if (key == Input.KEY_P) {
if (music.playing()) {
music.pause();
} else {
music.resume();
}
}
if (key == Input.KEY_C) {
music.stop();
if (music == musica) {
music = musicb;
} else {
music = musica;
}
music.loop();
}
if (key == Input.KEY_E) {
if (engine.playing()) {
engine.stop();
} else {
engine.loop();
}
}
if (c == '+') {
volume += 1;
setVolume();
}
if (c == '-') {
volume -= 1;
setVolume();
}
}