aboutsummaryrefslogtreecommitdiff
path: root/person.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2023-08-30 13:50:39 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2023-08-30 13:50:39 +0200
commit8add12c817e5af9d41bcf96c8387f8c2322b6f04 (patch)
tree27a08f5b7696bdf5a7192c5e3497d12d90652366 /person.go
parent89150a146d14c593aa7aa4bfb5569f76e62a2428 (diff)
fix: Better physics by multiplying by 10
Diffstat (limited to 'person.go')
-rw-r--r--person.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/person.go b/person.go
index 3462aa1..9ca5743 100644
--- a/person.go
+++ b/person.go
@@ -16,14 +16,14 @@ type Person struct {
}
func NewPerson(position Point) Person {
- image := ebiten.NewImage(10, 10)
+ image := ebiten.NewImage(100, 100)
image.Fill(color.RGBA{0xff, 0xff, 0xff, 0xff})
- selectedImage := ebiten.NewImage(12, 12)
+ selectedImage := ebiten.NewImage(120, 120)
op := &ebiten.DrawImageOptions{}
- op.GeoM.Translate(1, 1)
+ op.GeoM.Translate(10, 10)
selectedImage.Fill(color.RGBA{0xff, 0x00, 0x00, 0xff})
selectedImage.DrawImage(image, op)
- return Person{Position: position, size: Point{10, 10}, image: image, selectedImage: selectedImage}
+ return Person{Position: position, size: Point{100, 100}, image: image, selectedImage: selectedImage}
}
func (p Person) Image() *ebiten.Image {
@@ -45,5 +45,5 @@ func (p *Person) MoveTo(destination Point) {
}
func (p *Person) Update() {
- p.Position = p.move.Update(p.Position, 3)
+ p.Position = p.move.Update(p.Position, 30)
}