gdjs.JeuCode = {};


gdjs.JeuCode.GDPlayButtonObjects1= [];
gdjs.JeuCode.GDPlayButtonObjects2= [];
gdjs.JeuCode.GDPlayObjects1= [];
gdjs.JeuCode.GDPlayObjects2= [];
gdjs.JeuCode.GDGameTitleObjects1= [];
gdjs.JeuCode.GDGameTitleObjects2= [];
gdjs.JeuCode.GDPlatformObjects1= [];
gdjs.JeuCode.GDPlatformObjects2= [];
gdjs.JeuCode.GDBloqueurObjects1= [];
gdjs.JeuCode.GDBloqueurObjects2= [];
gdjs.JeuCode.GDRunnerObjects1= [];
gdjs.JeuCode.GDRunnerObjects2= [];
gdjs.JeuCode.GDTeleporterObjects1= [];
gdjs.JeuCode.GDTeleporterObjects2= [];
gdjs.JeuCode.GDPerdreObjects1= [];
gdjs.JeuCode.GDPerdreObjects2= [];
gdjs.JeuCode.GDScoreObjects1= [];
gdjs.JeuCode.GDScoreObjects2= [];
gdjs.JeuCode.GDTap2JumpObjects1= [];
gdjs.JeuCode.GDTap2JumpObjects2= [];

gdjs.JeuCode.conditionTrue_0 = {val:false};
gdjs.JeuCode.condition0IsTrue_0 = {val:false};
gdjs.JeuCode.condition1IsTrue_0 = {val:false};
gdjs.JeuCode.condition2IsTrue_0 = {val:false};
gdjs.JeuCode.condition3IsTrue_0 = {val:false};
gdjs.JeuCode.condition4IsTrue_0 = {val:false};
gdjs.JeuCode.conditionTrue_1 = {val:false};
gdjs.JeuCode.condition0IsTrue_1 = {val:false};
gdjs.JeuCode.condition1IsTrue_1 = {val:false};
gdjs.JeuCode.condition2IsTrue_1 = {val:false};
gdjs.JeuCode.condition3IsTrue_1 = {val:false};
gdjs.JeuCode.condition4IsTrue_1 = {val:false};

gdjs.JeuCode.func = function(runtimeScene, context) {
context.startNewFrame();
gdjs.JeuCode.GDPlayButtonObjects1.length = 0;
gdjs.JeuCode.GDPlayButtonObjects2.length = 0;
gdjs.JeuCode.GDPlayObjects1.length = 0;
gdjs.JeuCode.GDPlayObjects2.length = 0;
gdjs.JeuCode.GDGameTitleObjects1.length = 0;
gdjs.JeuCode.GDGameTitleObjects2.length = 0;
gdjs.JeuCode.GDPlatformObjects1.length = 0;
gdjs.JeuCode.GDPlatformObjects2.length = 0;
gdjs.JeuCode.GDBloqueurObjects1.length = 0;
gdjs.JeuCode.GDBloqueurObjects2.length = 0;
gdjs.JeuCode.GDRunnerObjects1.length = 0;
gdjs.JeuCode.GDRunnerObjects2.length = 0;
gdjs.JeuCode.GDTeleporterObjects1.length = 0;
gdjs.JeuCode.GDTeleporterObjects2.length = 0;
gdjs.JeuCode.GDPerdreObjects1.length = 0;
gdjs.JeuCode.GDPerdreObjects2.length = 0;
gdjs.JeuCode.GDScoreObjects1.length = 0;
gdjs.JeuCode.GDScoreObjects2.length = 0;
gdjs.JeuCode.GDTap2JumpObjects1.length = 0;
gdjs.JeuCode.GDTap2JumpObjects2.length = 0;


{

gdjs.JeuCode.GDBloqueurObjects1.createFrom(runtimeScene.getObjects("Bloqueur"));
gdjs.JeuCode.GDPerdreObjects1.createFrom(runtimeScene.getObjects("Perdre"));
gdjs.JeuCode.GDRunnerObjects1.createFrom(runtimeScene.getObjects("Runner"));
gdjs.JeuCode.GDTeleporterObjects1.createFrom(runtimeScene.getObjects("Teleporter"));

{gdjs.evtTools.camera.setCameraX(runtimeScene, (( gdjs.JeuCode.GDRunnerObjects1.length === 0 ) ? 0 :gdjs.JeuCode.GDRunnerObjects1[0].getPointX("")), "", 0);
}{gdjs.evtTools.camera.setCameraX(runtimeScene, (( gdjs.JeuCode.GDRunnerObjects1.length === 0 ) ? 0 :gdjs.JeuCode.GDRunnerObjects1[0].getPointX(""))*0.75, "Plan2", 0);
}{gdjs.evtTools.camera.setCameraX(runtimeScene, (( gdjs.JeuCode.GDRunnerObjects1.length === 0 ) ? 0 :gdjs.JeuCode.GDRunnerObjects1[0].getPointX(""))*0.50, "Plan3", 0);
}{gdjs.evtTools.camera.setCameraX(runtimeScene, (( gdjs.JeuCode.GDRunnerObjects1.length === 0 ) ? 0 :gdjs.JeuCode.GDRunnerObjects1[0].getPointX(""))*0.25, "Arrière Plan4", 0);
}{for(var i = 0, len = gdjs.JeuCode.GDBloqueurObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDBloqueurObjects1[i].hide();
}
for(var i = 0, len = gdjs.JeuCode.GDTeleporterObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDTeleporterObjects1[i].hide();
}
for(var i = 0, len = gdjs.JeuCode.GDPerdreObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDPerdreObjects1[i].hide();
}
}
}


{



{ //Subevents

{

gdjs.JeuCode.GDPlatformObjects2.createFrom(runtimeScene.getObjects("Platform"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
{
for(var i = 0, k = 0, l = gdjs.JeuCode.GDPlatformObjects2.length;i<l;++i) {
    if ( gdjs.JeuCode.GDPlatformObjects2[i].isOnLayer("Plan2") ) {
        gdjs.JeuCode.condition0IsTrue_0.val = true;
        gdjs.JeuCode.GDPlatformObjects2[k] = gdjs.JeuCode.GDPlatformObjects2[i];
        ++k;
    }
}
gdjs.JeuCode.GDPlatformObjects2.length = k;}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{for(var i = 0, len = gdjs.JeuCode.GDPlatformObjects2.length ;i < len;++i) {
    gdjs.JeuCode.GDPlatformObjects2[i].setOpacity(225);
}
}}

}


{

gdjs.JeuCode.GDPlatformObjects2.createFrom(runtimeScene.getObjects("Platform"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
{
for(var i = 0, k = 0, l = gdjs.JeuCode.GDPlatformObjects2.length;i<l;++i) {
    if ( gdjs.JeuCode.GDPlatformObjects2[i].isOnLayer("Plan3") ) {
        gdjs.JeuCode.condition0IsTrue_0.val = true;
        gdjs.JeuCode.GDPlatformObjects2[k] = gdjs.JeuCode.GDPlatformObjects2[i];
        ++k;
    }
}
gdjs.JeuCode.GDPlatformObjects2.length = k;}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{for(var i = 0, len = gdjs.JeuCode.GDPlatformObjects2.length ;i < len;++i) {
    gdjs.JeuCode.GDPlatformObjects2[i].setOpacity(150);
}
}}

}


{

gdjs.JeuCode.GDPlatformObjects2.createFrom(runtimeScene.getObjects("Platform"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
{
for(var i = 0, k = 0, l = gdjs.JeuCode.GDPlatformObjects2.length;i<l;++i) {
    if ( gdjs.JeuCode.GDPlatformObjects2[i].isOnLayer("Arrière Plan4") ) {
        gdjs.JeuCode.condition0IsTrue_0.val = true;
        gdjs.JeuCode.GDPlatformObjects2[k] = gdjs.JeuCode.GDPlatformObjects2[i];
        ++k;
    }
}
gdjs.JeuCode.GDPlatformObjects2.length = k;}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{for(var i = 0, len = gdjs.JeuCode.GDPlatformObjects2.length ;i < len;++i) {
    gdjs.JeuCode.GDPlatformObjects2[i].setOpacity(75);
}
}}

}

} //End of subevents

}


{

gdjs.JeuCode.GDRunnerObjects1.createFrom(runtimeScene.getObjects("Runner"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
{
gdjs.JeuCode.condition0IsTrue_0.val = !(gdjs.evtTools.camera.layerIsVisible(runtimeScene, "Jouer"));
}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{for(var i = 0, len = gdjs.JeuCode.GDRunnerObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDRunnerObjects1[i].setX(gdjs.JeuCode.GDRunnerObjects1[i].getX() + (5+(gdjs.evtTools.common.getVariableNumber(runtimeScene.getVariables().getFromIndex(0))/1000)));
}
}{runtimeScene.getGame().getVariables().getFromIndex(0).add(Math.round(1+(gdjs.evtTools.common.getVariableNumber(runtimeScene.getVariables().getFromIndex(0))/1000)));
}
{ //Subevents

{

gdjs.JeuCode.GDScoreObjects2.createFrom(runtimeScene.getObjects("Score"));

{for(var i = 0, len = gdjs.JeuCode.GDScoreObjects2.length ;i < len;++i) {
    gdjs.JeuCode.GDScoreObjects2[i].setString(gdjs.evtTools.common.getVariableString(runtimeScene.getGame().getVariables().getFromIndex(0))+"m");
}
}
}

} //End of subevents
}

}


{

gdjs.JeuCode.GDRunnerObjects1.createFrom(runtimeScene.getObjects("Runner"));
gdjs.JeuCode.GDTeleporterObjects1.createFrom(runtimeScene.getObjects("Teleporter"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
{
gdjs.JeuCode.condition0IsTrue_0.val = gdjs.evtTools.object.hitBoxesCollisionTest(context.clearEventsObjectsMap().addObjectsToEventsMap("Runner", gdjs.JeuCode.GDRunnerObjects1).getEventsObjectsMap(), context.clearEventsObjectsMap().addObjectsToEventsMap("Teleporter", gdjs.JeuCode.GDTeleporterObjects1).getEventsObjectsMap(), false, runtimeScene);
}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{for(var i = 0, len = gdjs.JeuCode.GDRunnerObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDRunnerObjects1[i].setX(-1150);
}
}{for(var i = 0, len = gdjs.JeuCode.GDRunnerObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDRunnerObjects1[i].setX(gdjs.JeuCode.GDRunnerObjects1[i].getX() + (150));
}
}}

}


{

gdjs.JeuCode.GDBloqueurObjects1.createFrom(runtimeScene.getObjects("Bloqueur"));
gdjs.JeuCode.GDPerdreObjects1.createFrom(runtimeScene.getObjects("Perdre"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
{
gdjs.JeuCode.condition0IsTrue_0.val = gdjs.evtTools.object.hitBoxesCollisionTest(context.clearEventsObjectsMap().addObjectsToEventsMap("Perdre", gdjs.JeuCode.GDPerdreObjects1).getEventsObjectsMap(), context.clearEventsObjectsMap().addObjectsToEventsMap("Bloqueur", gdjs.JeuCode.GDBloqueurObjects1).getEventsObjectsMap(), false, runtimeScene);
}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{gdjs.evtTools.runtimeScene.changeScene(runtimeScene, "Menu");
}}

}


{

gdjs.JeuCode.GDPerdreObjects1.createFrom(runtimeScene.getObjects("Perdre"));
gdjs.JeuCode.GDRunnerObjects1.createFrom(runtimeScene.getObjects("Runner"));

{for(var i = 0, len = gdjs.JeuCode.GDPerdreObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDPerdreObjects1[i].setPosition((( gdjs.JeuCode.GDRunnerObjects1.length === 0 ) ? 0 :gdjs.JeuCode.GDRunnerObjects1[0].getPointX(""))+(( gdjs.JeuCode.GDRunnerObjects1.length === 0 ) ? 0 :gdjs.JeuCode.GDRunnerObjects1[0].getWidth())-(gdjs.JeuCode.GDPerdreObjects1[i].getWidth()),(( gdjs.JeuCode.GDRunnerObjects1.length === 0 ) ? 0 :gdjs.JeuCode.GDRunnerObjects1[0].getPointY("")));
}
}
{ //Subevents

{

gdjs.JeuCode.GDBloqueurObjects2.createFrom(runtimeScene.getObjects("Bloqueur"));
gdjs.JeuCode.GDRunnerObjects2.createFrom(gdjs.JeuCode.GDRunnerObjects1);

gdjs.JeuCode.condition0IsTrue_0.val = false;
{
gdjs.JeuCode.condition0IsTrue_0.val = gdjs.evtTools.object.hitBoxesCollisionTest(context.clearEventsObjectsMap().addObjectsToEventsMap("Runner", gdjs.JeuCode.GDRunnerObjects2).getEventsObjectsMap(), context.clearEventsObjectsMap().addObjectsToEventsMap("Bloqueur", gdjs.JeuCode.GDBloqueurObjects2).getEventsObjectsMap(), false, runtimeScene);
}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{for(var i = 0, len = gdjs.JeuCode.GDRunnerObjects2.length ;i < len;++i) {
    gdjs.JeuCode.GDRunnerObjects2[i].setY(gdjs.JeuCode.GDRunnerObjects2[i].getY() - (1));
}
}}

}

} //End of subevents

}


{


gdjs.JeuCode.condition0IsTrue_0.val = false;
{
gdjs.JeuCode.condition0IsTrue_0.val = gdjs.evtTools.runtimeScene.timerElapsedTime(runtimeScene, 0.1, "speeder");
}if (gdjs.JeuCode.condition0IsTrue_0.val) {
{runtimeScene.getVariables().getFromIndex(0).add(0.1);
}{gdjs.evtTools.runtimeScene.resetTimer(runtimeScene, "speeder");
}}

}


{

gdjs.JeuCode.GDRunnerObjects1.createFrom(runtimeScene.getObjects("Runner"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
gdjs.JeuCode.condition1IsTrue_0.val = false;
{
gdjs.JeuCode.condition0IsTrue_0.val = gdjs.evtTools.input.isMouseButtonPressed(runtimeScene, "Left");
}if ( gdjs.JeuCode.condition0IsTrue_0.val ) {
{
{gdjs.JeuCode.conditionTrue_1 = gdjs.JeuCode.condition1IsTrue_0;
gdjs.JeuCode.conditionTrue_1.val = context.triggerOnce(165324944);
}
}}
if (gdjs.JeuCode.condition1IsTrue_0.val) {
{for(var i = 0, len = gdjs.JeuCode.GDRunnerObjects1.length ;i < len;++i) {
    gdjs.JeuCode.GDRunnerObjects1[i].getAutomatism("PlatformerObject").simulateJumpKey();
}
}}

}


{

gdjs.JeuCode.GDPlayButtonObjects1.createFrom(runtimeScene.getObjects("PlayButton"));

gdjs.JeuCode.condition0IsTrue_0.val = false;
gdjs.JeuCode.condition1IsTrue_0.val = false;
gdjs.JeuCode.condition2IsTrue_0.val = false;
gdjs.JeuCode.condition3IsTrue_0.val = false;
{
gdjs.JeuCode.condition0IsTrue_0.val = gdjs.evtTools.input.isMouseButtonPressed(runtimeScene, "Left");
}if ( gdjs.JeuCode.condition0IsTrue_0.val ) {
{
for(var i = 0, k = 0, l = gdjs.JeuCode.GDPlayButtonObjects1.length;i<l;++i) {
    if ( gdjs.JeuCode.GDPlayButtonObjects1[i].cursorOnObject(runtimeScene, true) ) {
        gdjs.JeuCode.condition1IsTrue_0.val = true;
        gdjs.JeuCode.GDPlayButtonObjects1[k] = gdjs.JeuCode.GDPlayButtonObjects1[i];
        ++k;
    }
}
gdjs.JeuCode.GDPlayButtonObjects1.length = k;}if ( gdjs.JeuCode.condition1IsTrue_0.val ) {
{
for(var i = 0, k = 0, l = gdjs.JeuCode.GDPlayButtonObjects1.length;i<l;++i) {
    if ( gdjs.JeuCode.GDPlayButtonObjects1[i].getAnimation() == 0 ) {
        gdjs.JeuCode.condition2IsTrue_0.val = true;
        gdjs.JeuCode.GDPlayButtonObjects1[k] = gdjs.JeuCode.GDPlayButtonObjects1[i];
        ++k;
    }
}
gdjs.JeuCode.GDPlayButtonObjects1.length = k;}if ( gdjs.JeuCode.condition2IsTrue_0.val ) {
{
{gdjs.JeuCode.conditionTrue_1 = gdjs.JeuCode.condition3IsTrue_0;
gdjs.JeuCode.conditionTrue_1.val = context.triggerOnce(166852280);
}
}}
}
}
if (gdjs.JeuCode.condition3IsTrue_0.val) {
{gdjs.evtTools.camera.hideLayer(runtimeScene, "Jouer");
}}

}

return;
}
gdjs['JeuCode']= gdjs.JeuCode;
