Completed Double Dispatch example.

This commit is contained in:
Ilkka Seppala
2015-05-08 21:49:04 +03:00
parent fba664ba49
commit 8c13dd0e10
6 changed files with 86 additions and 3 deletions

View File

@@ -6,4 +6,9 @@ public class FlamingAsteroid extends Meteoroid {
super(left, top, right, bottom);
setOnFire(true);
}
@Override
public void collision(GameObject gameObject) {
gameObject.collisionResolve(this);
}
}