mirror of
https://github.com/stevenhowes/GoRetro.git
synced 2026-05-26 15:53:31 +01:00
Moveable viewport. Absolute positioning (for UI etc) is possible. Added distance-based bounder for projectiles etc as 'screen' is no longer a suitable bounder. Removed debug msg.
This commit is contained in:
@@ -42,11 +42,16 @@ func (sr *spriteSheetRenderer) onUpdate() error {
|
||||
}
|
||||
|
||||
func (sr *spriteSheetRenderer) onDraw() error {
|
||||
Position := ViewPort.Position
|
||||
if !sr.container.PositionAbsolute {
|
||||
Position = vectorAdd(sr.container.Position, ViewPort.Position)
|
||||
}
|
||||
|
||||
return drawTexture(
|
||||
sr.tex,
|
||||
sr.size,
|
||||
sr.sheetposition,
|
||||
sr.container.Position,
|
||||
Position,
|
||||
sr.container.Rotation,
|
||||
sr.container.Renderer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user