eatevent$task.java

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

JAVA
42
字号
/*
 * EatEvent$Task.java
 *
 * Created on 2006年5月5日, 上午11:00
 *
 * 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:
//            EatEvent, GameView

class EatEvent$Task extends TimerTask
{
    int swapped;
    Image[] eat;
    GameView view;

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

    EatEvent$Task()
    {
    }
}

⌨️ 快捷键说明

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