// isNestedOnBottom.js
(function () {
/* global AdventureJS A */
var p = AdventureJS.Assets.Character.prototype;
/**
* Determine if player is nested at the bottom of parent asset.
* @memberOf AdventureJS.Assets.Character
* @method AdventureJS.Assets.Character#isNestedOnBottom
* @return {Boolean}
*/
p.isNestedOnBottom = function Character_isNestedOnBottom() {
if (!this.isNested("on")) {
return false;
}
var asset = this.getNestAsset();
if (!asset) return false;
var bottom = asset.getYBottom();
if (bottom >= this.position.y) {
return true;
}
return false;
};
})();