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

📄 gameview$task.java

📁 关于j2me的宠物游戏!!!!!!!!!!! 希望打架提出意见
💻 JAVA
字号:
/*
 * GameView$Task.java
 *
 * Created on 2006年5月5日, 上午11:24
 *
 * 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;

// Referenced classes of package com.webineti:
//            GameView, Game_control, GameData, MyRandom

class GameView$Task extends TimerTask
{
    Game_control game_control;

    public final void run()
    {
      
        GameData.Capacity--;
        GameData.Health--;
        GameData.Intelligence--;
        GameData.Mood--;
        GameData.Weight--;
        int d = MyRandom.randomize(100);
        if(d == 50)
        {
            if(GameData.Capacity > 60)
                GameData.Capacity = 60;
            if(GameData.Health > 40)
                GameData.Health = 40;
            if(GameData.Mood > 60)
                GameData.Mood = 60;
            GameData.Intelligence -= 10;
            if(GameData.Intelligence <= 0)
                GameData.Intelligence = 0;
            if(GameData.Weight <= 10)
                GameData.Weight = 10;
        }
        //repaint();
    }

    GameView$Task()
    {
    }
}

⌨️ 快捷键说明

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