You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GoldMinner/com/Drj/Object/Objectdrj.java

36 lines
715 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.Drj.Object;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.Toolkit;
public class Objectdrj {
//坐标
public int x;
public int y;
//宽高
public int width;
public int height;
//图片
Image img;
//用于判断是否被抓取
public boolean f;
//质量用于修改抓取速度
public int m;
//积分
public int count;
//类型 为1金矿 为2石头
public int type;
public void paint(Graphics g) {//绘制方法添加抓取物drawImage(地址x轴位置y轴位置状态)
g.drawImage(img,x,y,null);
}
public int getWidth() {
return width;
}
//获取矩形
public Rectangle getRec() {
return new Rectangle(x,y,width,height);
}
}