Permalink
Browse files

add jaws.Text() to test

  • Loading branch information...
1 parent f2b96b4 commit 0f49622c3531a2c04cc95a39c903d42e68766852 @ippa committed Jan 3, 2014
Showing with 3 additions and 0 deletions.
  1. +3 −0 examples/example9.html
View
@@ -26,9 +26,11 @@ <h3>jaws log</h3>
var fps
var viewport
var tile_map
+ var hud
/* Called once when a game state is activated. Use it for one-time setup code. */
this.setup = function() {
+ hud = new jaws.Text({text: "Welcome to example 9 - this is a static jaws.Text object", x: 50, y: 10})
live_info = document.getElementById("live_info")
blocks = new jaws.SpriteList()
var world = new jaws.Rect(0,0,320*10,320*2)
@@ -123,6 +125,7 @@ <h3>jaws log</h3>
this.draw = function() {
jaws.clear()
+ hud.draw();
// the viewport magic. wrap all draw()-calls inside viewport.apply and it will draw those relative to the viewport.
viewport.apply( function() {
blocks.draw()

0 comments on commit 0f49622

Please sign in to comment.