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

📄 normalobject.java

📁 J2ME做的打砖块游戏,是学校的课程项目
💻 JAVA
字号:

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.Random;
public class NormalObject
{
	public int x, y, cx, cy;
	public float vx = 0.0f, vy = 0.0f;
	public int strong;
	public int bonus;

	public NormalObject(int x, int y, Image objectImage)
	{
		this.x = x;
		this.y = y;
		this.cx = objectImage.getWidth();
		this.cy = objectImage.getHeight();

	}
	public NormalObject()
	{
	}

	public void setPos(int x, int y)
	{
		this.x = x;
		this.y = y;
	}

	
	public void paint(Graphics g, Image objectImage)
	{
		
		if (objectImage != null)
		{
			g.drawImage(objectImage, x, y, Graphics.TOP | Graphics.LEFT);
			
		}
		
	}

	public void paint(Graphics g)
	{
	}

	
}

⌨️ 快捷键说明

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