diff --git a/lib/game.dart b/lib/game.dart index 1c9aa825c..7a2b8035d 100644 --- a/lib/game.dart +++ b/lib/game.dart @@ -81,7 +81,7 @@ abstract class BaseGame extends Game { @mustCallSuper void preAdd(Component c) { if (debugMode() && c is PositionComponent) { - (c as PositionComponent).debugMode = true; + c.debugMode = true; } // first time resize if (size != null) {