View source code: https://github.com/a-mean-blogger/text-game-maker-js/blob/master/src/managers/debug-manager/debug-manager.js
Class (extends TM.IObject)
A class that creates instances print debugging data on the browser.
new TM.DebugManager(debugSetting)
true
after calling init function, false
after calling inactivate. The Object status(active/inactive) can be checked by this property.**View example source code: debug-manager-tutorial.js
First, create an instance of TM.ScreenManager and assign to var TMS(Text Game Maker Screen) and then First, create an instance of TM.DebugManager and assign to var TMD(Text Game Maker Debugging).
var TMS = new TM.ScreenManager(), TMD = new TM.DebugManager({devMode:true});
Create an instance of TM.Interval that creates current time and print on the screen with 1000 milliseconds interval. adding TMD.print function to print data.
var myWatch = new TM.Interval(1000,function(){ var date = new Date(); TMS.insertTextAt(1,1,date.toLocaleTimeString()); TMD.print("watchData",{date:date}); }) myWatch.init();
The debugging data is showing right side of Screen.
Type these commands into the browser console on this page to test.
//inactivate TMD TMD.inactivate(); //re-activate(initialize) TMD
TMD.init();
Comments
Login with SNS account to write comments. see details