ebiten: deprecate (*Image).Size

Closes #2351
This commit is contained in:
Hajime Hoshi
2023-01-19 23:42:35 +09:00
parent 8d61d43371
commit f054a7634a
43 changed files with 111 additions and 114 deletions

View File

@@ -58,7 +58,7 @@ func (s *Sprite) In(x, y int) bool {
// MoveBy moves the sprite by (x, y).
func (s *Sprite) MoveBy(x, y int) {
w, h := s.image.Size()
w, h := s.image.Bounds().Dx(), s.image.Bounds().Dy()
s.x += x
s.y += y
@@ -200,7 +200,7 @@ func init() {
func NewGame() *Game {
// Initialize the sprites.
sprites := []*Sprite{}
w, h := ebitenImage.Size()
w, h := ebitenImage.Bounds().Dx(), ebitenImage.Bounds().Dy()
for i := 0; i < 50; i++ {
s := &Sprite{
image: ebitenImage,