// 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() {
var bool = false;
if (false === this.isNested("on")) {
return false;
}
var thing = this.getNestAsset();
if (false === thing) return false;
var bottom = thing.getYBottom();
if (bottom >= this.position.y) {
bool = true;
}
return bool;
};
})();