add red crosshair to worldgen demo
This commit is contained in:
parent
59be43d80e
commit
25038d3ec0
1 changed files with 7 additions and 0 deletions
|
|
@ -185,6 +185,13 @@
|
|||
|
||||
(pxl8.world_render world [cam-x eye-y cam-z])
|
||||
|
||||
(let [cx (/ (pxl8.get_width) 2)
|
||||
cy (/ (pxl8.get_height) 2)
|
||||
crosshair-size 4
|
||||
red-color 18]
|
||||
(pxl8.line (- cx crosshair-size) cy (+ cx crosshair-size) cy red-color)
|
||||
(pxl8.line cx (- cy crosshair-size) cx (+ cy crosshair-size) red-color))
|
||||
|
||||
(pxl8.text (.. "fps: " (string.format "%.1f" (pxl8.get_fps))) 5 5 12)
|
||||
(pxl8.text (.. "pos: " (string.format "%.0f" cam-x) ","
|
||||
(string.format "%.0f" cam-y) ","
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue