1 Star 0 Fork 49

炎渊/WDC

forked from 吕焱飞/WDC 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Bacteria.java 622 Bytes
一键复制 编辑 原始数据 按行查看 历史
luyanfei78 提交于 2020-04-08 12:09 . add initial project.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Bacteria fload along in the bloodstream. They are bad. Best to destroy
* them if you can.
*
* @author Michael Kölling
* @version 0.1
*/
public class Bacteria extends Actor
{
/**
* Constructor. Nothing to do so far.
*/
public Bacteria()
{
}
/**
* Float along the bloodstream, slowly rotating.
*/
public void act()
{
setLocation(getX()-2, getY());
turn(1);
if (getX() == 0)
{
getWorld().removeObject(this);
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yan_yuan/WDC.git
git@gitee.com:yan_yuan/WDC.git
yan_yuan
WDC
WDC
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385