示例#1
0
文件: intro.go 项目: syndr0m/gotris
func drawIntroMask(screen *image.Image, frame uint64, fps uint) {
	var maxFrame uint64 = uint64(maskDuration * fps)

	if frame < maxFrame {
		black := mygameengine.COLOR_BLACK
		black.A = uint8(math.Max(0, 255-float64(frame)*(255/float64(maxFrame))))
		screen.DrawRectangle(0, 0, 640, 480, black)
	}
}
示例#2
0
文件: game.go 项目: syndr0m/gotris
func drawGameBackground(screen *image.Image) {
	screen.DrawRectangle(0, 0, 640, 480, mygameengine.COLOR_BLACK)
}
示例#3
0
文件: game.go 项目: syndr0m/gotris
func drawGameFlash(screen *image.Image, flash int) {
	white := mygameengine.COLOR_WHITE
	white.A = uint8(25 * flash)
	screen.DrawRectangle(0, 0, 640, 480, white)
}