文章列表
事件监听中的KeyListener的一个问题
……
public void keyPressed(KeyEvent e) {
// TODO Auto-generated method stub
if (e.getKeyCode() == KeyEvent.VK_LEFT
|| e.getKeyCode() == KeyEvent.VK_A) {
boy1.moveLeft();
boy1.direct = 2;
} else if (e.getKeyCode() == KeyEvent ...
package night; import java.net .InetSocketAddress; import java.io .IOException; import java.io .BufferedReader; import java.io .InputStreamReader; import java.nio.ByteBuffer; import java.nio.channels .SocketChannel; import java.nio.channels.*; public class Kfd extends Thread { /** * @param args */ pu ...
package night;
public class Test1 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Cyclink cyclink=new Cyclink();
cyclink.setLen(5);
cyclink.createLink();
cyclink.setK(2);
cyclink.setM(2);
cyclink.show(); ...
package SecondNight;import java.util.*;public class Reterement {
/** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner in=new Scanner(System.in); System.out.println("请输入你的年薪(payment)"); double payment =in.nextDouble(); System.out. ...
求解NPC(Non player character),求一个游戏NPC 的java服务器代码小示例!!!求高手指教,思路之类的都可以,万分感谢……
package fifthsa; public class Test1 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("创建一个二十个元素的随机的数组"); int Nu[]=new int[20]; MakeArray makeArray= new MakeArray(); makeArray.makeArray(Nu); //用Make类为函数随机赋值System.out.print ...