Add pacman and ghost tiles
This commit is contained in:
parent
c6b2a837b0
commit
8a33bb68aa
3 changed files with 27 additions and 3 deletions
|
|
@ -18,6 +18,16 @@ func DrawTile(x, y uint8, tile assets.Tile) {
|
|||
|
||||
// For now, just draw simple circles and rectangles.
|
||||
switch tile {
|
||||
case assets.TILE_PACMAN:
|
||||
drawPacman(px, py)
|
||||
case assets.TILE_BLINKY:
|
||||
drawGhost(px, py, rl.Red)
|
||||
case assets.TILE_PINKY:
|
||||
drawGhost(px, py, rl.Pink)
|
||||
case assets.TILE_INKY:
|
||||
drawGhost(px, py, rl.Blue)
|
||||
case assets.TILE_CLYDE:
|
||||
drawGhost(px, py, rl.Orange)
|
||||
case assets.TILE_PELLET:
|
||||
rl.DrawCircle(px+(TileSize/2), py+(TileSize/2), 1, rl.Beige)
|
||||
case assets.TILE_POWER_PELLET:
|
||||
|
|
@ -26,3 +36,11 @@ func DrawTile(x, y uint8, tile assets.Tile) {
|
|||
rl.DrawRectangle(px, py, TileSize, TileSize, rl.DarkBlue)
|
||||
}
|
||||
}
|
||||
|
||||
func drawGhost(x, y int32, col rl.Color) {
|
||||
rl.DrawCircle(x+(TileSize/2), y+(TileSize/2), 3, col)
|
||||
}
|
||||
|
||||
func drawPacman(x, y int32) {
|
||||
rl.DrawCircle(x+(TileSize/2), y+(TileSize/2), 3, rl.Yellow)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue