Skip to content

Instantly share code, notes, and snippets.

@AlabasterAxe
Created November 9, 2020 23:59
Show Gist options
  • Select an option

  • Save AlabasterAxe/a19557620449fbc664c8ebe261a8b496 to your computer and use it in GitHub Desktop.

Select an option

Save AlabasterAxe/a19557620449fbc664c8ebe261a8b496 to your computer and use it in GitHub Desktop.
Updated getRect implementation for the Dino GameObject
@override
Rect getRect(Size screenSize, double _) {
return Rect.fromLTWH(
screenSize.width / 10,
4 / 7 * screenSize.height - dino.imageHeight - dispY,
dino.imageWidth.toDouble(),
dino.imageHeight.toDouble());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment