Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// isNestedOnBottom.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Character.prototype;	
  /**
   * Determine if player is nested at the bottom of parent asset.
   * @memberOf adventurejs.Character
	 * @method adventurejs.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;
  }
 }());