From 6bac1a2c6364886a482530a0ef4cf849ae468806 Mon Sep 17 00:00:00 2001 From: jussi Date: Sun, 19 Jun 2022 20:38:50 +0300 Subject: Custom log function logLevel. --- examples/platformer/main.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples/platformer/main.lua') diff --git a/examples/platformer/main.lua b/examples/platformer/main.lua index d1160e1..2c954be 100644 --- a/examples/platformer/main.lua +++ b/examples/platformer/main.lua @@ -80,6 +80,12 @@ local function createMap() tilemap.tiles[1][8] = 6 end +function log( logLevel, message ) + if logLevel == LOG_WARNING then + error( "Terminated because of warning" ) + end +end + function init() local monitorPos = Vec2:new( RL_GetMonitorPosition( monitor ) ) local monitorSize = Vec2:new( RL_GetMonitorSize( monitor ) ) -- cgit v1.2.3