jueves, 31 de octubre de 2013

You an use an IF statement.


 e.other.color(0) == 1 ? {e.other.color = [0, 0, 0, 0]; e.other.collideSet = 0;} : {}
This will cause the ball to make objects disappear and cease to collide with anything if the red component of their color is one.  You might want to do this mechanically, though.  One time I entered a bomb contest in which the targets were hinged to a giant invisible killer block that was on an obscure collision set.  Once the blocks got knocked loose, they started colliding with the killer and were deleted.  Either way, there's no worry about overcounting the score, because each peg would only be able to be touched once.

No hay comentarios:

Publicar un comentario