[engine] update collision detect

This commit is contained in:
2018-02-02 17:30:50 +03:00
parent 6f338584eb
commit f9cb985059
5 changed files with 55 additions and 33 deletions

View File

@@ -131,7 +131,7 @@ class Render extends SpriteView implements EngineListener {
if (items.exists(bullet.key)) {
entryLayer.removeChild(items.get(bullet.key).view);
items.remove(bullet.key);
playBulletBoom(bullet.rect.center);
playBulletBoom(bullet.rect.center.add(new Point(bullet.rect.width * bullet.rect.direction.x, bullet.rect.height * bullet.rect.direction.y)));
}
case EntityType.EAGLE(eagle):
if (items.exists(eagle.key)) {