examples: show the tetris ghost by default
parent
96adfc9d5b
commit
5a308005d5
|
@ -115,7 +115,7 @@ mut:
|
|||
// gg context for drawing
|
||||
gg &gg.Context = voidptr(0)
|
||||
font_loaded bool
|
||||
show_ghost bool
|
||||
show_ghost bool = true
|
||||
// frame/time counters:
|
||||
frame int
|
||||
frame_old int
|
||||
|
@ -226,7 +226,8 @@ fn (g &Game) draw_ghost() {
|
|||
pos_y := g.move_ghost()
|
||||
for i in 0 .. tetro_size {
|
||||
tetro := g.tetro[i]
|
||||
g.draw_block_color(pos_y + tetro.y, g.pos_x + tetro.x, gx.gray)
|
||||
g.draw_block_color(pos_y + tetro.y, g.pos_x + tetro.x, gx.rgba(125, 125, 225,
|
||||
40))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue