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.
87 lines
2.1 KiB
87 lines
2.1 KiB
function initAll() {
|
|
darkMode();
|
|
setLang("fr");
|
|
dysFont();
|
|
|
|
}
|
|
|
|
var mobile = false;
|
|
var switchs = [], lineCount = [], logiques = [], lines = [], endLines = [], end, switchsInfo = [], switchsInfoCopy = [], lineRemove = [];
|
|
var width = window.innerWidth - window.innerWidth / 100 * 30;
|
|
var height = window.innerHeight /2.5;
|
|
var stage = new Konva.Stage({
|
|
container: 'setting_container',
|
|
width: width,
|
|
height: height,
|
|
});
|
|
var layer = new Konva.Layer();
|
|
tutoCreateLayer();
|
|
|
|
function tutoCreateLayer() {
|
|
width = window.innerWidth - window.innerWidth / 100 * 30;
|
|
stage = new Konva.Stage({
|
|
container: 'setting_container',
|
|
width: width,
|
|
height: height,
|
|
});
|
|
stage.add(layer);
|
|
|
|
colonneTot = 1;
|
|
numberPerColonne = [1];
|
|
var logiqueCount = 0;
|
|
|
|
for (let i = 0; i < colonneTot; i++) {
|
|
liveColonneNumber.push([]);
|
|
}
|
|
insertLogiqueColonne("logique1", "et", 0);
|
|
calculNombreSwitch();
|
|
switchCreator(numberOfSwitch);
|
|
createAllLinkSwitch();
|
|
|
|
initAllSwitch();
|
|
createEnd();
|
|
initEnd();
|
|
}
|
|
|
|
function resetAllTabs() {
|
|
switchs = [], lineCount = [], logiques = [], lines = [], endLines = [], end, switchsInfo = [], switchsInfoCopy = [], lineRemove = [];
|
|
width = window.innerWidth - window.innerWidth / 100 * 10;
|
|
height = window.innerHeight /1.5;
|
|
layer.destroyChildren();
|
|
}
|
|
|
|
function gameOne() {
|
|
|
|
stage = new Konva.Stage({
|
|
container: 'play_container',
|
|
/*rotation: -90,
|
|
x: 20,
|
|
y: 1000,*/
|
|
width: width,
|
|
height: height,
|
|
});
|
|
stage.add(layer);
|
|
|
|
colonneTot = 2;
|
|
numberPerColonne = [2,1];
|
|
var logiqueCount = 0;
|
|
|
|
for (let i = 0; i < colonneTot; i++) {
|
|
liveColonneNumber.push([]);
|
|
}
|
|
insertLogiqueColonne("logique1", "et", 0);
|
|
insertLogiqueColonne("logique2", "et", 0);
|
|
insertLogiqueColonne("logique3", "et", 1);
|
|
logiques.forEach(function (element) {
|
|
createLinkAuto(element.name);
|
|
});
|
|
calculNombreSwitch();
|
|
switchCreator(numberOfSwitch);
|
|
createAllLinkSwitch();
|
|
|
|
initAllSwitch();
|
|
createEnd();
|
|
initEnd();
|
|
|
|
checkAllSortieLogique();
|
|
} |