Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// onChangeGravity.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Tangible.prototype;	
  /**
  * Called when there is a change in gravity, 
  * providing an opportunity to override default behavior 
  * through the use of
  * <a href="/doc/Scripting_VerbReactions.html">verb effect hook</a> 
  * doChangeGravity.
  * @memberOf adventurejs.Tangible
	* @method adventurejs.Tangible#onChangeGravity
  */
  p.onChangeGravity = function Tangible_onChangeGravity(oldval, newval)
  {
    this.game.log( "log", "medium", this.name + " onChangeGravity " + oldval + ", " + newval + "." , "Behavior" );
    var results = this.callAction("doChangeGravity", null, {"oldval":oldval,"newval":newval} );
    if( "undefined" !== typeof results ) return results;            
    return;
  }
}());