mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
examples/blocks: Bug fix: applying ColorM (#356)
This commit is contained in:
parent
fb65fe1fee
commit
8e1d3a151e
@ -157,6 +157,7 @@ const (
|
|||||||
|
|
||||||
func drawBlocks(r *ebiten.Image, blocks [][]BlockType, x, y int, clr ebiten.ColorM) {
|
func drawBlocks(r *ebiten.Image, blocks [][]BlockType, x, y int, clr ebiten.ColorM) {
|
||||||
op := &ebiten.DrawImageOptions{}
|
op := &ebiten.DrawImageOptions{}
|
||||||
|
op.ColorM = clr
|
||||||
for j := 0; j < len(blocks[0]); j++ {
|
for j := 0; j < len(blocks[0]); j++ {
|
||||||
for i := 0; i < len(blocks); i++ {
|
for i := 0; i < len(blocks); i++ {
|
||||||
op.GeoM.Reset()
|
op.GeoM.Reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user