Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function connectNodes(mostrar:Boolean):void {
- var largo = nodos.length;
- var mc, i, j, nodo;
- if (mostrar) {
- mc = new MovieClip("lineas", this.DisplayObjectContainer.numChildren());
- mc.lineStyle (.1, 0xEEEEEE);
- }
- for (i = 0; i < largo; i++) {
- nodo = nodos[i];
- trace("Nodes connected:"+nodos);
- trace("node x:"+nodo.x);
- trace("node y:"+nodo.y);
- nodo.conArr = new Array ();
- for (j = 0; j < nodos.length; j++) {
- if (i != j) {
- if (nodo.vision (nodos[j], area)) {
- mc.graphics.moveTo (nodos[i].x, nodos[i].y);
- mc.graphics.lineTo (nodos[j].x, nodos[j].y);
- nodo.conArr.push (nodos[j]);
- }
- }
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement