データを読み込む為にプラグインを自作しているのですが、
同一のプラグイン内にフォルダ分けのつもりでif文を使っています。
この時のプラグインコマンドを実行した時の処理時間はどうなるのか教えて頂きたいです。
質問内容は...
・プラグインコマンド「①」で実行した場合と、プラグインコマンド「②」で実行した場合で処理時間は、
「①」=「②」なのか「①」<「②」なのか?
(プラグインコマンド「①」を実行したところで、結局プラグイン内の全てのコードを通過する為、実行はしないものの「②」100000000行を通過するため処理時間は変わらない? ⇒ プラグインを別々のファイルに分けた方が良い?)
同一プラグイン内に
「①」は3行
「②」は100000000行から対象データを探し出す。
コード: 全て選択
(function() {
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === '①') {
var A = "①データ";
if( args[0] == 1 ){ A = "①データ1" };
if( args[0] == 2 ){ A = "①データ2" };
if( args[0] == 3 ){ A = "①データ3" };
$gameVariables.setValue(1 ,A );
};
if (command === '②') {
var A = "②データ0";
if( args[0] == 1 ){ A = "②データ1" };
if( args[0] == 2 ){ A = "②データ2" };
if( args[0] == 3 ){ A = "②データ3" };
if( args[0] == 4 ){ A = "②データ4" };
if( args[0] == 5 ){ A = "②データ5" };
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
if( args[0] == 99999998 ){ A = "②データ 99999998" };
if( args[0] == 99999999 ){ A = "②データ 99999999" };
if( args[0] == 100000000 ){ A = "②データ100000000" };
$gameVariables.setValue(2 ,A );
};
};
})();
以上、よろしくお願い致します。