HTML and CSS Reference
In-Depth Information
case 1:
if (checkBounds(1,0,tempEnemy)){
moveFound = true;
}else{
}
break;
case 2:
if (checkBounds(0,-1, tempEnemy)){
moveFound = true;
}else{
}
break;
case 3:
if (checkBounds(0,1,tempEnemy)){
moveFound = true;
}else{
}
break
}
}
}
tempEnemy.destinationX = tempEnemy.nextCol*32;
tempEnemy.destinationY = tempEnemy.nextRow*32;
}else{
tempEnemy.nextCol = tempEnemy.col;
tempEnemy.nextRow = tempEnemy.row;
tempEnemy.destinationX = tempEnemy.nextCol*32;
tempEnemy.destinationY = tempEnemy.nextRow*32;
}
}
switchGameState(GAME_STATE_ANIMATE_ENEMY);
}
function gameStateAnimateEnemy(){
for (var eCtr=enemy.length-1;eCtr>=0;eCtr--){
var tempEnemy = enemy[eCtr];
if (!tempEnemy.moveComplete){
Search WWH ::




Custom Search