[ascii] fix test backend compatibility
This commit is contained in:
@@ -6,6 +6,7 @@ import asciilib.GameLogic;
|
||||
import asciilib.Game;
|
||||
import asciilib.Graphics;
|
||||
import asciilib.Colors;
|
||||
import asciilib.Assets;
|
||||
import asciilib.backends.test.TestGraphicsBackend;
|
||||
|
||||
class DrawOnlyWhenModifiedGameLogic implements GameLogic {
|
||||
@@ -13,9 +14,11 @@ class DrawOnlyWhenModifiedGameLogic implements GameLogic {
|
||||
|
||||
public function new() {}
|
||||
|
||||
public function update(deltaSeconds:Float):Void {}
|
||||
public function initialize(assets:Assets) {}
|
||||
|
||||
public function draw(graphics:Void->Graphics):Void {
|
||||
public function update(game:Game, deltaSeconds:Float):Void {}
|
||||
|
||||
public function draw(graphics:Void->Graphics, assets:Assets):Void {
|
||||
if (firstDraw) {
|
||||
graphics().setLetter(0, 0, {char: "@", color: Colors.Red});
|
||||
firstDraw = false;
|
||||
@@ -33,4 +36,4 @@ class DrawOnlyWhenModifiedTestCase extends Test {
|
||||
game.draw();
|
||||
Assert.equals(1, graphicsBackend.drawCalled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user