赞 | 20 |
VIP | 0 |
好人卡 | 1 |
积分 | 37 |
经验 | 9653 |
最后登录 | 2024-2-17 |
在线时间 | 1133 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3657
- 在线时间
- 1133 小时
- 注册时间
- 2017-4-6
- 帖子
- 278
|
我用的国外论坛上的一个插件,然后自己改了一下
- //=============================================================================
- // AnimationFrameRate.js
- // by Tsukimi
- // Last Updated: 2018.02.11
- //=============================================================================
- /*:en
- * @plugindesc AnimationFrameRate
- * @author Tsukimi
- *
- * @param framerate:1
- * @desc
- * @default !
- *
- * @param framerate:2
- * @desc
- * @default @
- *
- * @param framerate:3
- * @desc
- * @default #
- *
- * @param framerate:4
- * @desc
- * @default $
- *
- * @param framerate:5
- * @desc
- * @default %
- *
- * @param framerate:6
- * @desc
- * @default ^
- *
- * @param framerate:7
- * @desc
- * @default &
- *
- * @param framerate:8
- * @desc
- * @default *
- *
- * @param framerate:9
- * @desc
- * @default ((
- *
- * @param framerate:10
- * @desc
- * @default ))
- *
- * @help
- * 速度1~10 在动画名称前添加速度对应的符号即可
- *
- * -----------------
- *
- */
- (function() {
- 'use strict';
-
- var pluginName = 'AnimationFrameRate';
- var getParam = function(paramNames) {
- if (!Array.isArray(paramNames)) paramNames = [paramNames];
- for (var i = 0; i < paramNames.length; i++) {
- var name = PluginManager.parameters(pluginName)[paramNames[i]];
- if (name) return name;
- }
- return "";
- };
-
- var FR1 = getParam("framerate:1").substr(0, 1);
- var FR2 = getParam("framerate:2").substr(0, 1);
- var FR3 = getParam("framerate:3").substr(0, 1);
- var FR4 = getParam("framerate:4").substr(0, 1);
- var FR5 = getParam("framerate:5").substr(0, 1);
- var FR6 = getParam("framerate:6").substr(0, 1);
- var FR7 = getParam("framerate:7").substr(0, 1);
- var FR8 = getParam("framerate:8").substr(0, 1);
- var FR9 = getParam("framerate:9").substr(0, 1);
- var FR10 = getParam("framerate:10").substr(0, 1);
-
- var _Sprite_Animation_setupRate = Sprite_Animation.prototype.setupRate;
- Sprite_Animation.prototype.setupRate = function() {
- if(!this._animation) {
- _Sprite_Animation_setupRate.apply(this, arguments);
- return;
- }
- var initial = this._animation.name.substr(0,1);
- if(initial === FR1) this._rate = 1;
- else if(initial === FR2) this._rate = 2;
- else if(initial === FR3) this._rate = 3;
- else if(initial === FR4) this._rate = 4;
- else if(initial === FR5) this._rate = 5;
- else if(initial === FR6) this._rate = 6;
- else if(initial === FR7) this._rate = 7;
- else if(initial === FR8) this._rate = 8;
- else if(initial === FR9) this._rate = 9;
- else if(initial === FR10) this._rate = 10;
- else _Sprite_Animation_setupRate.apply(this, arguments);
- };
-
- })();
复制代码 |
|