예제 #1
0
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 프로젝트: reachtheflow/gotris
func drawGameBackground(screen *image.Image) {
	screen.DrawRectangle(0, 0, 640, 480, mygameengine.COLOR_BLACK)
}
예제 #3
0
파일: game.go 프로젝트: reachtheflow/gotris
func drawGameFlash(screen *image.Image, flash int) {
	white := mygameengine.COLOR_WHITE
	white.A = uint8(25 * flash)
	screen.DrawRectangle(0, 0, 640, 480, white)
}