package com.tarena.bird; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO; public class Ground { BufferedImage image; int x; int y; int width; int height; public Ground(int y) throws IOException { image = ImageIO.read(getClass().getResource("ground.png")); this. y = y; width = image.getWidth(); height = image.getHeight(); x = 0; } public void step(){ x--; if(x<= -(width-358)){ x=0; } } public void paint(Graphics g) { g.drawImage(image, x, y, null); } }
最近下载更多
alexcheung LV3
2022年12月17日
杨少聪 LV5
2021年6月10日
一两天_ LV1
2021年5月27日
675104182 LV14
2020年9月22日
荒唐的羊 LV27
2020年7月1日
java小书童 LV17
2020年6月9日
15966848095 LV22
2020年2月8日
635969151 LV12
2019年12月18日
candice123 LV7
2019年12月11日
qweqweqwe321321233 LV10
2019年11月5日
最近浏览更多
陈小灏 LV14
2023年12月15日
微信网友_6699076084797440 LV7
2023年10月30日
jiemomo LV12
2023年10月19日
yangxb2 LV10
2023年7月11日
hougui LV1
2023年6月20日
17683946472 LV9
2023年6月8日
泓鼎168 LV19
2023年5月10日
微信网友_6444139264921600 LV6
2023年4月27日
香菇肉饼汤 LV7
2023年4月13日
想把它染成绿色
2023年3月1日
暂无贡献等级