eatfruitevent$task.java

来自「关于j2me的宠物游戏!!!!!!!!!!! 希望打架提出意见」· Java 代码 · 共 47 行

JAVA
47
字号
/*
 * EatFruitEvent$Task.java
 *
 * Created on 2006年5月5日, 上午11:03
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package DogPet;

import java.util.TimerTask;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Image;

// Referenced classes of package com.webineti:
//            EatFruitEvent, GameView

class EatFruitEvent$Task extends TimerTask
{
    int swapped,repeat;
    GameView view;
    Image[] eat ;

    public final void run()
    {
        if(GameView.events == 1)
        {
            swapped = swapped + 1;
            if(swapped > eat.length - 1)
            {
                swapped = 0;
                repeat++;
                if(repeat > 2)
                {
                    GameView.events = -1;
                    repeat = 0;
                }
            }
            view.repaint();
        }
    }

    EatFruitEvent$Task()
    {
    }
}

⌨️ 快捷键说明

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