[ascii] letters!

This commit is contained in:
2021-04-25 01:39:40 -06:00
parent 1f57aab3b2
commit 5e16fd84f4
8 changed files with 54 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -6,4 +6,5 @@
(defmethod :Void draw [:Void->Graphics graphics]
(when firstDraw
(set firstDraw false)
(.setBackgroundColor (graphics) 5 5 Colors.White)))
(.setBackgroundColor (graphics) 5 5 Colors.White)
(.setLetter (graphics) 10 5 (object char "@" color Colors.Red))))

View File

@@ -3,6 +3,7 @@ package;
import flixel.FlxState;
import asciilib.Game;
import asciilib.backends.flixel.*;
import flixel.graphics.FlxGraphic;
class PlayState extends FlxState
{
@@ -11,7 +12,9 @@ class PlayState extends FlxState
override public function create()
{
super.create();
game = new Game("Beware Yon Death Trap", 40, 24, 8, 12, new DeathTrapLogic(), new FlxGraphicsBackend(this));
game = new Game("Beware Yon Death Trap", 40, 24, 8, 12, new DeathTrapLogic(),
new FlxGraphicsBackend(this, FlxGraphic.fromAssetKey("assets/images/size12.png"),
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,.;:/?!@#$%^&*()-_=+[]{}~ÁÉÍÑÓÚÜáéíñóúü¡¿0123456789\"'<>|"));
}
override public function update(elapsed:Float)