package main.java.player;

import jgame.platform.JGEngine;

public class TDPlayerEngine extends JGEngine {
	
	public TDPlayerEngine() {
		super();
		initEngineComponent(960, 640);
	}
	
	@Override
	public void initCanvas() {
		setCanvasSettings(15, 10, 32, 32, null, null, null);
	}

	@Override
	public void initGame() {
		setFrameRate(35, 2);
	}

	public void doFrame() {
		
	}
}

@@ -37,25 +37,100 @@
 ame.
-platform.JGEngine
+JGColor;%0Aimport jgame.JGPoint;%0Aimport jgame.platform.JGEngine;%0Aimport main.java.engine.Model
 ;%0A%0Ap
@@ -175,16 +175,41 @@
 ngine %7B%0A
+    private Model model;%0A
 %09%0A%09publi
@@ -359,20 +359,29 @@
 , null, 
-null
+JGColor.black
 , null);
@@ -441,49 +441,1361 @@
 ate(
-35, 2);%0A%09%7D%0A%0A%09public void doFrame() %7B%0A%09%09%0A%09
+45, 1);%0A        this.model = new Model();%0A        model.setEngine(this);%0A        model.addNewPlayer();%0A        model.loadMap(%22testmap.json%22);%0A        defineMedia(%22/main/resources/media.tbl%22);%0A        model.setTemporaryWaveSchema();%0A%09%7D%0A%09%0A    @Override%0A    public void paintFrame() %7B%0A        highlightMouseoverTile();%0A        displayGameStats();%0A    %7D%0A%0A    private void highlightMouseoverTile() %7B%0A        JGPoint mousePos = getMousePos();%0A        int curXTilePos = mousePos.x/tileWidth() * tileWidth();%0A        int curYTilePos = mousePos.y/tileHeight() * tileHeight();%0A%0A        this.drawRect(curXTilePos, curYTilePos, tileWidth(), tileHeight(), false, false, 1.0, JGColor.yellow);%0A    %7D%0A    %0A    private void displayGameStats() %7B%0A    %09this.drawString(%22Score: %22+model.getScore(), 50, 25, -1);%0A    %09this.drawString(%22Lives left: %22+model.getPlayerLife(), 50, 50, -1);%0A    %09this.drawString(%22Money: %22+model.getMoney(), 50, 75, -1);%0A    %09this.drawString(%22Game clock: %22+model.getGameClock(), 50, 100, -1);%0A    %7D%0A%0A    @Override%0A    public void doFrame() %7B%0A        super.doFrame();%0A        model.updateGameClockByFrame();%0A        if (getMouseButton(1)) %7B%0A            model.placeTower(getMouseX(), getMouseY());%0A        %7D%0A        if (model.getGameClock() %25 100 == 0)%0A        %09model.spawnNextWave();%0A        moveObjects();%0A//        model.spawnMonster(100, 150);%0A    
 %7D%0A%7D%0A

Make player talk to engine