Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // Jump
- // By Reshi
- // Jump.js
- // Version: 1.0
- // Free for commercial and non commercial use.
- //=============================================================================
- var Imported = Imported || {};
- var _aliasOldUpdateGamePlayer = Game_Player.prototype.update;
- Game_Player.prototype.update = function() {
- _aliasOldUpdateGamePlayer.call(this);
- if ( Input.prototype.trigger.call(:X) ) {
- if ( Game_Player.prototype.passable.call(this.x, this.y, this.direction) ) {
- switch (this.direction) {
- case 2:
- this.jump(0, 1);
- break;
- case 4:
- this.jump(-1, 0);
- break;
- case 6:
- this.jump(1, 0);
- break;
- case 8:
- this.jump(0, -1);
- break;
- default:
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement