mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-11-01 01:18:38 +08:00 
			
		
		
		
	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:
		| @ -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 | ||||
|  | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Erick
					Erick