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 à :
@@ -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,
|
||||||
|
|||||||
@@ -794,15 +794,33 @@ function saveEditLevel()
|
|||||||
|
|
||||||
function stageMouseDown(event)
|
function stageMouseDown(event)
|
||||||
{
|
{
|
||||||
mouseDown = 1;
|
var e = event.nativeEvent;
|
||||||
//console.log("DOWN");
|
// ------------------------------------------------------------------------
|
||||||
|
// 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;
|
||||||
|
//console.log(e.which)
|
||||||
|
//console.log("DOWN");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function stageMouseUp(event)
|
function stageMouseUp(event)
|
||||||
{
|
{
|
||||||
mouseDown = 0;
|
var e = event.nativeEvent;
|
||||||
lastDown = {x:-1, y:-1};
|
// ------------------------------------------------------------------------
|
||||||
//console.log("UP");
|
// 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;
|
||||||
|
lastDown = {x:-1, y:-1};
|
||||||
|
//console.log(e.which)
|
||||||
|
//console.log("UP");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initMapInfo()
|
function initMapInfo()
|
||||||
|
|||||||
Référencer dans un nouveau ticket
Bloquer un utilisateur