Skip to content

Instantly share code, notes, and snippets.

@hex13
Last active August 29, 2015 14:11
if (isIntersection(entities[i], entities[j])) {
// JEST KOLIZJA! COS TRZEBA ZROBIC!
if (entities[i].type == 'missile' || entities[j].type == 'missile') { // jesli jeden z obiektow jest pociskiem
// to "zabij" oba obiekty (czyli zarowno zniknie pocisk, jak i to, w co walnie ulegnie zniszczeniu).
entities[i].dead = true;
entities[j].dead = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment