mirror of
https://github.com/Febbweiss/sis.git
synced 2026-03-04 22:25:35 +00:00
Refactoring: better way to manage aliens Refatcoring: creating models and animations folders to manage independent files
13 lines
293 B
JavaScript
13 lines
293 B
JavaScript
function getAliensMidHeight() {
|
|
var higherAlien = Math.max.apply( null,
|
|
$(".alien").map(function() {
|
|
return $(this).y();
|
|
}).get() ),
|
|
lowerAlien = Math.min.apply( null,
|
|
$(".alien").map(function() {
|
|
return $(this).y();
|
|
}).get() );
|
|
|
|
return (higherAlien + lowerAlien) / 2;
|
|
}
|