Transforming PaletteEntry#paint into a full method and adding more colors to BasicPalette (#725)

* Transforming PaletteEntry#paint into a full method

* Fixing some errors that went unoticed

* Update packages/flame/CHANGELOG.md

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>

* Update packages/flame/CHANGELOG.md

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>

* followup

* format

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
This commit is contained in:
Erick
2021-03-27 14:53:29 -03:00
committed by GitHub
parent 4640ce0934
commit 444375dd14
16 changed files with 29 additions and 27 deletions

View File

@ -108,7 +108,7 @@ Right, now we have all the data and variables we need to start implementing our
class MyGame extends Game {
// BasicPalette is a help class from Flame, which provides default, pre built instances
// of Paint that can be used by your game
static final squarePaint = BasicPalette.white.paint;
static final squarePaint = BasicPalette.white.paint();
// Update mehod ommited

View File

@ -13,7 +13,7 @@ void main() {
class MyGame extends Game {
static const int squareSpeed = 400;
static final squarePaint = BasicPalette.white.paint;
static final squarePaint = BasicPalette.white.paint();
late Rect squarePos;
int squareDirection = 1;