Canvas reset with starting picture.

This commit is contained in:
William Burns 2015-12-23 10:26:14 +00:00
parent ad1d444af8
commit c48df36459

View File

@ -54,6 +54,7 @@ import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.KeenEyeStatTracker;
import nautilus.game.arcade.stats.MrSquiggleStatTracker;
import nautilus.game.arcade.stats.PureLuckStatTracker;
import sun.misc.REException;
public class Draw extends SoloGame
{
@ -204,11 +205,18 @@ public class Draw extends SoloGame
@Override
public void ParseData()
{
for (Location loc : WorldData.GetCustomLocs("159"))
_canvas.add(loc.getBlock());
for (Block b : UtilBlock.getInBoundingBox(WorldData.GetDataLocs("LIME").get(0), WorldData.GetDataLocs("LIME").get(1)))
_canvas.add(b);
_drawerLocation = WorldData.GetDataLocs("RED").get(0);
_textLocation = WorldData.GetDataLocs("YELLOW").get(0);
}
@EventHandler
public void clearBoardStart(GameStateChangeEvent e)
{
if (e.GetState() != GameState.Live)
return;
Reset();
}
@ -706,8 +714,9 @@ public class Draw extends SoloGame
{
for (Block block : _canvas)
{
if (block.getTypeId() != 35 || block.getData() != 0)
block.setTypeIdAndData(35, (byte)0, false);
// if (block.getTypeId() != 35 || block.getData() != 0)
// block.setTypeIdAndData(35, (byte)0, false);
block.setTypeIdAndData(35, (byte) 0, false);
}
_brushColor = 15;