aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--catgag.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/catgag.js b/catgag.js
index b7bbf96..6a88847 100644
--- a/catgag.js
+++ b/catgag.js
@@ -38,5 +38,16 @@ Game.handleKeys = function() {
window.Game = Game;
}(window));
-window.onload = function() { Ticker.setFPS(30); Game.init(); }
+window.Log = function(str) {
+ var ts = Date.now().toString();
+ ts = ts.substr(ts.length - 6);
+ window.LogElem.value = ts + " " + str + "\n" + window.LogElem.value;
+}
+
+window.onload = function() {
+ window.LogElem = document.getElementById("log");
+ window.Log("window.onload()");
+ Ticker.setFPS(30);
+ Game.init();
+}