1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-06 18:27:20 -05:00
OpenDiablo2/d2core/d2render/d2mapengine/camera.go
Tim Sarbin 2461142fbd
Minor changes to project layout (#276)
* Minor changes to reduce interdependencies on modules.
2020-01-31 23:18:11 -05:00

21 lines
262 B
Go

package d2mapengine
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
}