@@ -101,92 +101,6 @@ var World = new Class({
101101 this . updateWall ( top , 'top' , x , y - thickness , width , thickness ) ;
102102 this . updateWall ( bottom , 'bottom' , x , y + height , width , thickness ) ;
103103
104- // if (left)
105- // {
106- // if (leftWall)
107- // {
108- // leftWall.setSize(x - thickness, y, thickness, height);
109- // }
110- // else
111- // {
112- // this.walls.left = this.create(x - thickness, y, thickness, height);
113- // this.walls.left.gravityFactor = 0;
114- // this.walls.left.collides = COLLIDES.FIXED;
115- // }
116- // }
117- // else
118- // {
119- // if (leftWall)
120- // {
121- // this.bodies.remove(leftWall);
122- // }
123-
124- // this.walls.left = null;
125- // }
126-
127- // if (right)
128- // {
129- // if (rightWall)
130- // {
131- // rightWall.setSize(x + width, y, thickness, height);
132- // }
133- // else
134- // {
135- // this.walls.right = this.create(x + width, y, thickness, height);
136- // }
137- // }
138- // else
139- // {
140- // if (rightWall)
141- // {
142- // this.bodies.remove(rightWall);
143- // }
144-
145- // this.walls.right = null;
146- // }
147-
148- // if (top)
149- // {
150- // if (topWall)
151- // {
152- // topWall.setSize(x, y - thickness, width, thickness);
153- // }
154- // else
155- // {
156- // this.walls.top = this.create(x, y - thickness, width, thickness);
157- // }
158- // }
159- // else
160- // {
161- // if (topWall)
162- // {
163- // this.bodies.remove(topWall);
164- // }
165-
166- // this.walls.top = null;
167- // }
168-
169- // if (bottom)
170- // {
171- // if (bottomWall)
172- // {
173- // bottomWall.setSize(x, y + height, width, thickness);
174- // }
175- // else
176- // {
177- // this.walls.bottom = this.create(x, y + height, width, thickness);
178- // }
179- // }
180- // else
181- // {
182- // if (bottomWall)
183- // {
184- // this.bodies.remove(bottomWall);
185- // }
186-
187- // this.walls.bottom = null;
188- // }
189-
190104 return this ;
191105 } ,
192106
@@ -204,6 +118,7 @@ var World = new Class({
204118 else
205119 {
206120 this . walls [ position ] = this . create ( x , y , width , height ) ;
121+ this . walls [ position ] . name = position ;
207122 this . walls [ position ] . gravityFactor = 0 ;
208123 this . walls [ position ] . collides = COLLIDES . FIXED ;
209124 }
0 commit comments