//============================================================================= // MrLiu_CharaterZoom.js //============================================================================= /*: * @plugindesc 在RMMV游戏中的实现类似RM系列作品中近大远小的功能 * @author MrLiu-过眼云烟 * * @help 使用方法是在地图的备注中加入<Character_zoom:0.7> 即地图上人物会缩放为正常的0.7倍 * 交通工具不会随之缩放,即行走图名称包含Vehicle的不会随之缩放。 */ //----------------------------------------------------------------------------- var _MrLiu_CharaterZoom_update = Sprite_Character.prototype.update; Sprite_Character.prototype.update = function() { _MrLiu_CharaterZoom_update.call(this); var map = $dataMap; if(map.meta.Character_zoom && (this._characterName.indexOf("Vehicle")!= 0) ){//Cts.indexOf("Text") > 0 this.scale.x = map.meta.Character_zoom; this.scale.y = map.meta.Character_zoom; }; };
623 Bytes, 下载次数: 386
var PluginMethods; PluginMethods = { doScale: function(scale) { var _Sprite_Character_prototype_update; _Sprite_Character_prototype_update = Sprite_Character.prototype.update; Sprite_Character.prototype.update = function() { _Sprite_Character_prototype_update.call(this); if (!(this._character instanceof Game_Vehicle)) { this._character._dashing = false; this._character._moveSpeed = scale * 4; this.scale.x = scale; this.scale.y = scale; } }; } }; (function() { var _Game_Interpreter_pluginCommand; _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; return Game_Interpreter.prototype.pluginCommand = function(command, args) { _Game_Interpreter_pluginCommand.call(this, command, args); switch (command) { case 'plug-in': switch (args[0]) { case 'doScale': PluginMethods.doScale(args[1]); } } }; })();
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |