MCPcopy Create free account
hub / github.com/SolarLune/masterplan / ViewArea

Method ViewArea

camera.go:115–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113}
114
115func (camera *Camera) ViewArea() *sdl.Rect {
116
117 width := int32(globals.ScreenSize.X / camera.Zoom)
118 height := int32(globals.ScreenSize.Y / camera.Zoom)
119
120 rect := &sdl.Rect{
121 X: int32(camera.Position.X - float32(width/2)),
122 Y: int32(camera.Position.Y - float32(height/2)),
123 W: width,
124 H: height,
125 }
126
127 return rect
128
129}
130
131func (camera *Camera) FocusOn(zoom bool, cards ...*Card) {
132

Callers 4

UpdateMethod · 0.80
DrawGridMethod · 0.80
UpdateMethod · 0.80
RawWorldPositionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected