@@ -13,26 +13,34 @@ public void collision(GameObject gameObject) {
1313
1414 @ Override
1515 public void collisionResolve (FlamingAsteroid asteroid ) {
16- System .out .println (String .format ("%s hits %s" , asteroid .getClass ().getSimpleName (), this .getClass ().getSimpleName ()));
16+ System .out .println (String .format ("%s hits %s. %s is damaged! %s is set on fire!" ,
17+ asteroid .getClass ().getSimpleName (), this .getClass ().getSimpleName (),
18+ this .getClass ().getSimpleName (), this .getClass ().getSimpleName ()));
1719 setDamaged (true );
1820 setOnFire (true );
1921 }
2022
2123 @ Override
2224 public void collisionResolve (Meteoroid meteoroid ) {
23- System .out .println (String .format ("%s hits %s" , meteoroid .getClass ().getSimpleName (), this .getClass ().getSimpleName ()));
25+ System .out .println (String .format ("%s hits %s. %s is damaged!" ,
26+ meteoroid .getClass ().getSimpleName (), this .getClass ().getSimpleName (),
27+ this .getClass ().getSimpleName ()));
2428 setDamaged (true );
2529 }
2630
2731 @ Override
2832 public void collisionResolve (SpaceStationMir mir ) {
29- System .out .println (String .format ("%s hits %s" , mir .getClass ().getSimpleName (), this .getClass ().getSimpleName ()));
33+ System .out .println (String .format ("%s hits %s. %s is damaged!" ,
34+ mir .getClass ().getSimpleName (), this .getClass ().getSimpleName (),
35+ this .getClass ().getSimpleName ()));
3036 setDamaged (true );
3137 }
3238
3339 @ Override
3440 public void collisionResolve (SpaceStationIss iss ) {
35- System .out .println (String .format ("%s hits %s" , iss .getClass ().getSimpleName (), this .getClass ().getSimpleName ()));
41+ System .out .println (String .format ("%s hits %s. %s is damaged!" ,
42+ iss .getClass ().getSimpleName (), this .getClass ().getSimpleName (),
43+ this .getClass ().getSimpleName ()));
3644 setDamaged (true );
3745 }
3846}
0 commit comments