예제 #1
0
파일: tile.go 프로젝트: beoran/fungo
// Draws the motion's active bitmap at the given coordinates
func (m *Motion) Draw(screen *sdl.Surface, x, y int) {
	if m == nil {
		return
	} // don't blit if the tile is nil.
	active := m.active
	if active == nil {
		return
	} // don't blit if no frame there yet.
	screen.Blit(active, x, y)
}
예제 #2
0
파일: tile.go 프로젝트: beoran/fungo
// Draws the layer to the screen using x and y as the corner coordinates
func (l *Layer) Draw(screen *sdl.Surface, x, y int) {
	cam := &Camera{Offset{x, y}, screen.W(), screen.H()}
	l.DrawCamera(screen, cam)
}