You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
655 B

class gameData {
constructor(hauteur, largeur) {
this.hauteur = hauteur;
this.largeur = largeur;
}
}
function createSwitch(id, x, y) {
var switche = {
id : id,
x : x,
y : y,
};
switchsInfo.push(switche);
switchsInfoCopy.push(switche);
switchs.push(id);
var num = lineCount.length;
lineCount.push(1);
var rect1 = new Konva.Rect({
x: x,
y: y,
width: SwitchWidth,
height: SwitchHeight,
stroke: colorSwitchBorder,
fill: colorSwitchInnactiveBackground,
strokeWidth: 4,
id: id,
id3: null,
});
layer.add(rect1);
}