Created
March 2, 2016 18:41
-
-
Save HimeWorks/9ba811c69ea4119869a2 to your computer and use it in GitHub Desktop.
Test. Draw 100 numbers in a window on the map.
This file contains 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
function Window_Test() { | |
this.initialize.apply(this, arguments); | |
} | |
Window_Test.prototype = Object.create(Window_Base.prototype); | |
Window_Test.prototype.constructor = Window_Test; | |
Window_Test.prototype.initialize = function() { | |
Window_Base.prototype.initialize.call(this, 0, 0, Graphics.width, 200); | |
this.createContents(); | |
for (var i = 0; i < 100; i++) { | |
this.contents.drawText(i, 0, i * 24, 100, 24); | |
} | |
} | |
Window_Test.prototype.createContents = function() { | |
this.contents = new Bitmap(this.contentsWidth(), 10000); | |
this.resetFontSettings(); | |
}; | |
Scene_Map.prototype.createAllWindows = function() { | |
this.createMessageWindow(); | |
this.createScrollTextWindow(); | |
this._test = new Window_Test(); | |
this._test.opacity = 0 | |
this.addWindow(this._test); | |
}; | |
Scene_Map.prototype.update = function() { | |
this.updateDestination(); | |
this.updateMainMultiply(); | |
if (this.isSceneChangeOk()) { | |
this.updateScene(); | |
} else if (SceneManager.isNextScene(Scene_Battle)) { | |
this.updateEncounterEffect(); | |
} | |
this.updateWaitCount(); | |
Scene_Base.prototype.update.call(this); | |
if (Input.isPressed("up")) { | |
this._test.origin.y += 5; | |
} | |
else if (Input.isPressed("down")) { | |
this._test.origin.y -= 5; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment