- change onChoise for ads
This commit is contained in:
Kum1ta
2024-11-20 23:06:52 +01:00
parent 3cfaf9d525
commit cf324a7b0c

View File

@ -6,7 +6,7 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */ /* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/20 14:52:55 by hubourge #+# #+# */ /* Created: 2024/08/20 14:52:55 by hubourge #+# #+# */
/* Updated: 2024/11/20 14:37:03 by edbernar ### ########.fr */ /* Updated: 2024/11/20 23:00:52 by edbernar ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -136,10 +136,10 @@ class Map
this.putScoreboard(0xCCCCFF); this.putScoreboard(0xCCCCFF);
path = [ path = [
{name: 'goal', onChoice: true, src: files.goalVideoPub}, {name: 'goal', onChoice: true, src: files.goalVideoPub},
{name: 'easteregg', onChoice: true, src: files.easterEggVideoPub}, {name: 'easteregg', onChoice: false, src: files.easterEggVideoPub},
{name: 'outstanding', onChoice: true, src: files.outstandingVideoPub},
{name: 'ping', onChoice: false, src: files.pingVideoPub},
{name: 'catch', onChoice: false, src: files.catchVideoPub}, {name: 'catch', onChoice: false, src: files.catchVideoPub},
{name: 'ping', onChoice: false, src: files.pingVideoPub},
{name: 'outstanding', onChoice: false, src: files.outstandingVideoPub},
{name: 'fortnite', onChoice: false, src: files.fortniteVideoPub}, {name: 'fortnite', onChoice: false, src: files.fortniteVideoPub},
]; ];
}; };
@ -585,6 +585,7 @@ class Map
return (0); return (0);
} }
console.log(path);
// Fill the videoList with the videos // Fill the videoList with the videos
for (let i = startIndex; i < (nbVideos + startIndex); i++) for (let i = startIndex; i < (nbVideos + startIndex); i++)
{ {
@ -593,6 +594,7 @@ class Map
startIndex++; startIndex++;
continue ; continue ;
} }
console.log(path[i].name);
let videoTmp = null; let videoTmp = null;
videoTmp = new Video(path[i].src).video; videoTmp = new Video(path[i].src).video;
videoTmp.addEventListener('loadeddata', () => { videoTmp.addEventListener('loadeddata', () => {