From eaa29e72939f5edf61735ccbb73c36ee89369f65 Mon Sep 17 00:00:00 2001 From: Amir Rajan Date: Fri, 10 Dec 2021 00:09:48 -0600 Subject: Synced with DragonRuby Game Toolkit v3.2. --- samples/10_advanced_debugging/00_logging/app/main.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 samples/10_advanced_debugging/00_logging/app/main.rb (limited to 'samples/10_advanced_debugging/00_logging/app/main.rb') diff --git a/samples/10_advanced_debugging/00_logging/app/main.rb b/samples/10_advanced_debugging/00_logging/app/main.rb new file mode 100644 index 0000000..f97b9d8 --- /dev/null +++ b/samples/10_advanced_debugging/00_logging/app/main.rb @@ -0,0 +1,19 @@ +def tick args + args.outputs.background_color = [255, 255, 255, 0] + if args.state.tick_count == 0 + args.gtk.log_spam "log level spam" + args.gtk.log_debug "log level debug" + args.gtk.log_info "log level info" + args.gtk.log_warn "log level warn" + args.gtk.log_error "log level error" + args.gtk.log_unfiltered "log level unfiltered" + puts "This is a puts call" + args.gtk.console.show + end + + if args.state.tick_count == 60 + puts "This is a puts call on tick 60" + elsif args.state.tick_count == 120 + puts "This is a puts call on tick 120" + end +end -- cgit v1.2.3