Created
April 5, 2011 23:10
-
-
Save duncanbeevers/904775 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import net.flashpunk.Entity; | |
import net.flashpunk.FP; | |
import net.flashpunk.graphics.Graphiclist; | |
import net.flashpunk.graphics.Text; | |
public class HUD extends Entity { | |
[Embed(source = "assets/fonts/pf_tempesta_seven.TTF", embedAsCFF=false, fontFamily = "what")] | |
public var myvar:String; | |
private var g:Graphiclist = new Graphiclist(); | |
private var a:Text = new Text('' , 8, 8, 480, 480); | |
public function HUD() { | |
g.add(a); | |
graphic = g; | |
layer = -1000; | |
a.font = "what"; | |
} | |
override public function update():void { | |
a.scrollX = a.scrollY = 0; | |
a.text = "X: " + int(Player.coords.x) + "\r\nY: " + int(Player.coords.y); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment