Lode Runner v2.21i, AI_VERSION=4

Editor mode: only left mouse button support draw/erase tile !
Modified file: lodeRunner.edit.js
Cette révision appartient à :
SimonHung
2020-09-30 21:43:50 +08:00
Parent 0bfca18335
révision 0dc0835dc3
2 fichiers modifiés avec 24 ajouts et 6 suppressions
+1 -1
Voir le fichier
@@ -1,4 +1,4 @@
var VERSION = "2.21g"; var VERSION = "2.21i";
var AI_VERSION = 4; var AI_VERSION = 4;
var NO_OF_TILES_X = 28, var NO_OF_TILES_X = 28,
+18
Voir le fichier
@@ -794,15 +794,33 @@ function saveEditLevel()
function stageMouseDown(event) function stageMouseDown(event)
{ {
var e = event.nativeEvent;
// ------------------------------------------------------------------------
// nativeEvent: https://createjs.com/docs/easeljs/classes/MouseEvent.html
// which: https://www.w3schools.com/jsref/event_which.asp
// ------------------------------------------------------------------------
if( e.which === undefined || e.which == 1 ) { // 1: left, 2: middle, 3: right
// only support left mouse button
mouseDown = 1; mouseDown = 1;
//console.log(e.which)
//console.log("DOWN"); //console.log("DOWN");
}
} }
function stageMouseUp(event) function stageMouseUp(event)
{ {
var e = event.nativeEvent;
// ------------------------------------------------------------------------
// nativeEvent: https://createjs.com/docs/easeljs/classes/MouseEvent.html
// which: https://www.w3schools.com/jsref/event_which.asp
// ------------------------------------------------------------------------
if( e.which === undefined || e.which == 1 ) { // 1: left, 2: middle, 3: right
// only support left mouse button
mouseDown = 0; mouseDown = 0;
lastDown = {x:-1, y:-1}; lastDown = {x:-1, y:-1};
//console.log(e.which)
//console.log("UP"); //console.log("UP");
}
} }
function initMapInfo() function initMapInfo()