1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-10-31 16:27:18 -04:00
OpenDiablo2/d2core/d2map/camera.go
Alex Yatskov 8a547ebf0e
Moving files around to make more sense (#279)
* Prevent input fighting between terminal and other input listeners.

* Moving files around, removing exports

* Add missing line
2020-02-01 18:55:56 -05:00

21 lines
256 B
Go

package d2map
type Camera struct {
x float64
y float64
}
func (c *Camera) MoveTo(x, y float64) {
c.x = x
c.y = y
}
func (c *Camera) MoveBy(x, y float64) {
c.x += x
c.y += y
}
func (c *Camera) GetPosition() (float64, float64) {
return c.x, c.y
}