mirror of
https://github.com/wassname/phaser.git
synced 2026-08-12 12:20:38 +08:00
Tilemap collision working but needs speeding up
This commit is contained in:
@@ -224,16 +224,13 @@ module Phaser {
|
||||
{
|
||||
if (objectOrGroup.exists && objectOrGroup.allowCollisions != Collision.NONE)
|
||||
{
|
||||
// Get the tiles this object overlaps with (could be any number based on its width/height)
|
||||
|
||||
// Iterate through each tile, checking if it overlaps with the object bounds
|
||||
|
||||
// Yes? then separate, else abort
|
||||
this.currentLayer.getTileOverlaps(objectOrGroup);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// todo
|
||||
objectOrGroup.forEachAlive(this.currentLayer.getTileOverlaps);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user