| OLD | NEW |
| 1 part of ppw_canvas; | 1 part of ppw_canvas; |
| 2 | 2 |
| 3 // NOTE: setGameManager must be called immediately after construction | 3 // NOTE: setGameManager must be called immediately after construction |
| 4 | 4 |
| 5 class ScoreElement extends Thing { | 5 class ScoreElement extends Thing { |
| 6 static const _bombsLeftStr = "BOMBS LEFT:"; | 6 static const _bombsLeftStr = "BOMBS LEFT:"; |
| 7 static const _valueOffset = 15; | 7 static const _valueOffset = 15; |
| 8 | 8 |
| 9 GameManager _gameManager; | 9 GameManager _gameManager; |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 num _getTextSize(CanvasRenderingContext2D ctx) { | 84 num _getTextSize(CanvasRenderingContext2D ctx) { |
| 85 if(_textSize == null) { | 85 if(_textSize == null) { |
| 86 final mets = ctx.measureText(_bombsLeftStr); | 86 final mets = ctx.measureText(_bombsLeftStr); |
| 87 _textSize = mets.width; | 87 _textSize = mets.width; |
| 88 } | 88 } |
| 89 return _textSize; | 89 return _textSize; |
| 90 } | 90 } |
| 91 | 91 |
| 92 Game get _game => _gameManager.game; | 92 Game get _game => _gameManager.game; |
| 93 } | 93 } |
| OLD | NEW |