use of yyl.example.exercise.awt.tank.GameMatrix in project yyl_example by Relucent.
the class Mover method hitBorder.
protected boolean hitBorder(int _x, int _y) {
//
GameMatrix matrix = GameMatrix.getInstance();
Rectangle bounds = matrix.getBounds();
return !bounds.contains(_x, _y, width, height);
}
use of yyl.example.exercise.awt.tank.GameMatrix in project yyl_example by Relucent.
the class BulletDestroyd method probe.
/**
* ����غ��ϰ�
*/
protected Collection<Unit> probe() {
GameMatrix matrix = GameMatrix.getInstance();
Collection<Unit> units = matrix.inBlock(x, y, width, height);
units.remove(this);
return units;
}
use of yyl.example.exercise.awt.tank.GameMatrix in project yyl_example by Relucent.
the class Mover method probe.
protected Collection<Unit> probe(int _x, int _y) {
GameMatrix matrix = GameMatrix.getInstance();
Collection<Unit> units = matrix.inBlock(_x, _y, width, height);
units.remove(this);
return units;
}
Aggregations