Created
November 26, 2016 19:42
-
-
Save triacontane/7a599b5f1acf7a3451a6a93fc72be4c5 to your computer and use it in GitHub Desktop.
イベント間で線を引くサンプル
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
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(); | |
sprite.bitmap = bitmap; | |
SceneManager._scene.addChild(sprite); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment