mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-06-09 08:29:32 +00:00
changed to drawing shells first each frame, before robots
This commit is contained in:
parent
9b49d3dd60
commit
5753b593a2
|
@ -145,12 +145,12 @@
|
|||
|
||||
var drawWorld = function(previousWorld, currentWorld) {
|
||||
ctx.clearRect(0, 0, width, height);
|
||||
currentWorld.robots.forEach(function(robot, idx) {
|
||||
drawRobot(robot, ROBOT_COLORS[idx]);
|
||||
});
|
||||
currentWorld.shells.forEach(function(shell) {
|
||||
drawShell(shell);
|
||||
});
|
||||
currentWorld.robots.forEach(function(robot, idx) {
|
||||
drawRobot(robot, ROBOT_COLORS[idx]);
|
||||
});
|
||||
if (currentWorld.shells.length > previousWorld.shells.length) {
|
||||
shotSound.play();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user