This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var strJSON = undefined; | |
(function() { | |
'use strict'; | |
var strJSON = 'aaa'; | |
var testFunc = function() { | |
strJSON += 'bbb'; | |
var testFunc2 = function() { | |
strJSON += 'ccc'; | |
}; | |
testFunc2(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// アイテム画面 | |
SceneManager.push(Scene_Item); | |
// スキル、ステータス、装備画面 | |
var actor = $gameActors.actor(1); | |
var bitmap = ImageManager.loadFace(actor.faceName(), 0); | |
bitmap.addLoadListener(function() { | |
$gameParty.setMenuActor(actor); | |
SceneManager.push(Scene_Skill); | |
// SceneManager.push(Scene_Status); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
// base:実行中のプロジェクトのルートパス | |
var base = path.dirname(process.mainModule.filename); | |
// filePath:base + img/pictures | |
var filePath = path.join(base, 'img/pictures/'); | |
var fs = require('fs'); | |
// img/pictures配下のファイルに対して繰り返し処理を実行 | |
fs.readdirSync(filePath).forEach(function(fileName) { | |
console.log(fileName); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = 'https://twitter.com/triacontane'; | |
if (Utils.isNwjs()) { | |
var exec = require('child_process').exec; | |
switch (process.platform) { | |
case 'win32': | |
exec('rundll32.exe url.dll,FileProtocolHandler "' + url + '"'); | |
break; | |
default: | |
exec('open "' + url + '"'); | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (pluginParam) { | |
var _Window_Message_processEscapeCharacter = Window_Message.prototype.processEscapeCharacter; | |
Window_Message.prototype.processEscapeCharacter = function(code, textState) { | |
_Window_Message_processEscapeCharacter.apply(this, arguments); | |
console.log('aaaa'); | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileName = 'TraitConditions.js'; // ダウンロードしたいプラグインのファイル名 | |
var url = 'https://raw.githubusercontent.com/triacontane/RPGMakerMV/master/' + fileName; | |
var path = require('path'); | |
var projectBase = path.dirname(process.mainModule.filename); | |
var downloadPath = path.join(projectBase, 'js/plugins/') + fileName; | |
var childProcess = require('child_process'); | |
var command = 'bitsadmin.exe /TRANSFER PLUGIN_DOWNLOAD ' + url + ' ' + downloadPath; | |
console.log('ExecuteCommand : ' + command); | |
childProcess.exec(command, function(error, stdout, stderr) { | |
console.log(stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sprite = new Sprite(); | |
var bitmap = new Bitmap(816, 624); | |
var ctx = bitmap.context; | |
ctx.beginPath(); | |
var x1 = $gameMap.event(this._eventId).screenX(); | |
var y1 = $gameMap.event(this._eventId).screenY() - 24; | |
ctx.moveTo(x1, y1); | |
var x2 = $gameMap.event(10).screenX(); | |
var y2 = $gameMap.event(10).screenY() - 24; | |
ctx.lineTo(x2,y2);ctx.stroke(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pictureId = 1, variableIdOfWidth = 1, variableIdOfHeight = 2; | |
var spritePicture = SceneManager._scene._spriteset._pictureContainer.children.filter(function(picture) { | |
return picture._pictureId === pictureId; | |
})[0]; | |
$gameVariables.setValue(variableIdOfWidth, spritePicture.width); | |
$gameVariables.setValue(variableIdOfHeight, spritePicture.height); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConfigManager.bgmVolume = $gameVariables.value(n); | |
ConfigManager.save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gameSystem.onBeforeSave(); | |
DataManager.saveGame(DataManager.lastAccessedSavefileId()); |