Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// moveTo.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Tangible.prototype;	
  /**
   * moveFrom is an alias to onMoveThatToThis 
   * but with asset and this reversed
   * purely for syntactic convenience.
   * @memberOf adventurejs.Tangible
	 * @method adventurejs.Tangible#moveTo
   * @param {String} aspect
   * @param {Object} asset
   */
  p.moveTo = function Tangible_moveTo( aspect, asset )
  {
    if("string" === typeof asset) asset = this.game.getAsset(asset);
    if(!aspect||!asset) return false;
    if(!asset.hasAspectAt(aspect)) return false;
    return asset.onMoveThatToThis( this, aspect );
  }
 }());