We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b66a0aa commit 9ad1230Copy full SHA for 9ad1230
1 file changed
src/physics/arcade/Body.js
@@ -661,6 +661,16 @@ Phaser.Physics.Arcade.Body.prototype = {
661
onFloor: function () {
662
return this.blocked.down;
663
},
664
+
665
+ /**
666
+ * Returns true if the top of this Body is in contact with either the world bounds or a tile.
667
+ *
668
+ * @method Phaser.Physics.Arcade.Body#onTop
669
+ * @return {boolean} True if in contact with either the world bounds or a tile.
670
+ */
671
+ onCeiling: function(){
672
+ return this.blocked.up;
673
+ },
674
675
/**
676
* Returns true if either side of this Body is in contact with either the world bounds or a tile.
0 commit comments