本文整理匯總了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();
}
}