@@ -19,9 +19,15 @@ module Phaser.Physics {
1919 this . yw = Math . abs ( yw ) ;
2020
2121 this . aabbTileProjections = { } ;
22- this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_FULL ] = Phaser . Physics . Projection . AABBFull . Collide ;
22+ this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_22DEGs ] = Phaser . Physics . Projection . AABB22Deg . CollideS ;
23+ this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_22DEGb ] = Phaser . Physics . Projection . AABB22Deg . CollideB ;
24+ this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_45DEG ] = Phaser . Physics . Projection . AABB45Deg . Collide ;
25+ this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_67DEGs ] = Phaser . Physics . Projection . AABB67Deg . CollideS ;
26+ this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_67DEGb ] = Phaser . Physics . Projection . AABB67Deg . CollideB ;
2327 this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_CONCAVE ] = Phaser . Physics . Projection . AABBConcave . Collide ;
2428 this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_CONVEX ] = Phaser . Physics . Projection . AABBConvex . Collide ;
29+ this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_FULL ] = Phaser . Physics . Projection . AABBFull . Collide ;
30+ this . aabbTileProjections [ Phaser . Physics . TileMapCell . CTYPE_HALF ] = Phaser . Physics . Projection . AABBHalf . Collide ;
2531
2632 }
2733
@@ -41,7 +47,7 @@ module Phaser.Physics {
4147
4248 private aabbTileProjections ;
4349
44- public IntegrateVerlet ( ) {
50+ public integrateVerlet ( ) {
4551
4652 var d = 1 ; // global drag
4753 var g = 0.2 ; // global gravity
@@ -63,7 +69,7 @@ module Phaser.Physics {
6369
6470 }
6571
66- public ReportCollisionVsWorld ( px : number , py : number , dx : number , dy : number , obj : TileMapCell ) {
72+ public reportCollisionVsWorld ( px : number , py : number , dx : number , dy : number , obj : TileMapCell = null ) {
6773
6874 var p = this . pos ;
6975 var o = this . oldpos ;
@@ -113,7 +119,7 @@ module Phaser.Physics {
113119 }
114120
115121
116- public CollideAABBVsTile ( tile :Phaser . Physics . TileMapCell ) {
122+ public collideAABBVsTile ( tile :Phaser . Physics . TileMapCell ) {
117123
118124 var pos = this . pos ;
119125 var c = tile ;
@@ -167,13 +173,13 @@ module Phaser.Physics {
167173 }
168174 }
169175
170- this . ResolveBoxTile ( px , py , this , c ) ;
176+ this . resolveBoxTile ( px , py , this , c ) ;
171177
172178 }
173179 }
174180 }
175181
176- public CollideAABBVsWorldBounds ( ) {
182+ public collideAABBVsWorldBounds ( ) {
177183
178184 var p = this . pos ;
179185 var xw = this . xw ;
@@ -189,7 +195,7 @@ module Phaser.Physics {
189195 if ( 0 < dx )
190196 {
191197 //object is colliding with XMIN
192- this . ReportCollisionVsWorld ( dx , 0 , 1 , 0 , null ) ;
198+ this . reportCollisionVsWorld ( dx , 0 , 1 , 0 , null ) ;
193199 }
194200 else
195201 {
@@ -198,7 +204,7 @@ module Phaser.Physics {
198204 if ( 0 < dx )
199205 {
200206 //object is colliding with XMAX
201- this . ReportCollisionVsWorld ( - dx , 0 , - 1 , 0 , null ) ;
207+ this . reportCollisionVsWorld ( - dx , 0 , - 1 , 0 , null ) ;
202208 }
203209 }
204210
@@ -208,7 +214,7 @@ module Phaser.Physics {
208214 if ( 0 < dy )
209215 {
210216 //object is colliding with YMIN
211- this . ReportCollisionVsWorld ( 0 , dy , 0 , 1 , null ) ;
217+ this . reportCollisionVsWorld ( 0 , dy , 0 , 1 , null ) ;
212218 }
213219 else
214220 {
@@ -217,7 +223,7 @@ module Phaser.Physics {
217223 if ( 0 < dy )
218224 {
219225 //object is colliding with YMAX
220- this . ReportCollisionVsWorld ( 0 , - dy , 0 , - 1 , null ) ;
226+ this . reportCollisionVsWorld ( 0 , - dy , 0 , - 1 , null ) ;
221227 }
222228 }
223229 }
@@ -235,15 +241,15 @@ module Phaser.Physics {
235241
236242 }
237243
238- public ResolveBoxTile ( x , y , box , t ) {
244+ public resolveBoxTile ( x , y , box , t ) {
239245
240246 if ( 0 < t . ID )
241247 {
242248 return this . aabbTileProjections [ t . CTYPE ] ( x , y , box , t ) ;
243249 }
244250 else
245251 {
246- //trace("ResolveBoxTile () was called with an empty (or unknown) tile!: ID=" + t.ID + " ("+ t.i + "," + t.j + ")");
252+ //trace("resolveBoxTile () was called with an empty (or unknown) tile!: ID=" + t.ID + " ("+ t.i + "," + t.j + ")");
247253 return false ;
248254 }
249255 }
0 commit comments