⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fork.java

📁 fishgame手机游戏 运用工具netbean可以运行起来
💻 JAVA
字号:
package cn.zucc.mmf.harpoon;import javax.microedition.lcdui.Image;import javax.microedition.lcdui.game.Sprite;import java.util.*;/* * To change this template, choose Tools | Templates * and open the template in the editor. *//** * * @author Administrator */class Fork extends Sprite{    Image m_image;    private static final int IMAGE_COLUMNS = 2;    private static final int IMAGE_ROWS = 1;    public static int m_fallY;    public static int fork_down=0;    public static int fork_up=0;    public Fork(Image image){       super(image,image.getWidth()/IMAGE_COLUMNS,image.getHeight()/1);       m_fallY=1;    /*  int x = Math.abs(rand.nextInt()) % (screenwidth - getWidth());      setPosition(x, y);*/    }   public  void fall() {     	move(0, m_fallY);        //nextFrame();         //System.out.println("--------m_fallY000000000000----");   }   public void changeState(){      if(HarpoonCanvas.fork_control==0){         if(fork_down==1){             fork_up=0;             fork_down++;             m_fallY=9;             this.setVisible(true);             //fall();         }         if(fork_up==1){            fork_up++;            fork_down=0;         }      }   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -