[asciilib] White cell in Death Trap

This commit is contained in:
2021-04-25 00:30:34 -06:00
parent bd2b36bf1f
commit 1f57aab3b2
11 changed files with 76 additions and 11 deletions

View File

@@ -2,6 +2,8 @@ package;
import asciilib.GameLogic;
import asciilib.Graphics;
import asciilib.Colors;
import kiss.Prelude;
@:build(kiss.Kiss.build())
class DeathTrapLogic implements GameLogic {}

View File

@@ -1,4 +1,9 @@
(defnew [] [:Int a 5])
(defprop &mut firstDraw true)
(defmethod new [] 0)
(defmethod :Void update [:Float deltaSeconds] 0)
(defmethod :Void draw [:Void->Graphics graphics] 0)
(defmethod :Void draw [:Void->Graphics graphics]
(when firstDraw
(set firstDraw false)
(.setBackgroundColor (graphics) 5 5 Colors.White)))

View File

@@ -11,7 +11,7 @@ class PlayState extends FlxState
override public function create()
{
super.create();
game = new Game("Beware Yon Death Trap", 100, 40, 8, 12, new DeathTrapLogic(), new FlxGraphicsBackend());
game = new Game("Beware Yon Death Trap", 40, 24, 8, 12, new DeathTrapLogic(), new FlxGraphicsBackend(this));
}
override public function update(elapsed:Float)