示例#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)
}