Check all css/js files
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/28 12:23:48 by edbernar #+# #+# */
|
||||
/* Updated: 2024/11/18 19:24:56 by hubourge ### ########.fr */
|
||||
/* Updated: 2024/11/19 15:06:07 by hubourge ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -59,7 +59,6 @@ class Map
|
||||
|
||||
initialSpeed = 0.1;
|
||||
speed = 0.4;
|
||||
// vec2.z = 0 * initialSpeed;
|
||||
if (Math.random() > 0.5)
|
||||
{
|
||||
vec2.z = (Math.random() * 0.8 - 0.4) * initialSpeed;
|
||||
|
@ -3,10 +3,10 @@
|
||||
/* ::: :::::::: */
|
||||
/* Players.js :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/28 15:12:25 by edbernar #+# #+# */
|
||||
/* Updated: 2024/11/18 17:02:43 by edbernar ### ########.fr */
|
||||
/* Updated: 2024/11/19 15:07:11 by hubourge ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -17,7 +17,6 @@ const speed = 0.25;
|
||||
let player1 = null;
|
||||
let player2 = null;
|
||||
let pressedButton = [];
|
||||
|
||||
let key = null;
|
||||
|
||||
class Players
|
||||
|
@ -3,10 +3,10 @@
|
||||
/* ::: :::::::: */
|
||||
/* multiLocalGamePage.js :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/28 12:07:39 by edbernar #+# #+# */
|
||||
/* Updated: 2024/11/18 17:02:43 by edbernar ### ########.fr */
|
||||
/* Updated: 2024/11/19 15:06:49 by hubourge ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -20,16 +20,6 @@ let scene = null;
|
||||
let renderer = null;
|
||||
let camera = null;
|
||||
|
||||
/*
|
||||
Controls :
|
||||
- w : monter player1
|
||||
- s : descendre player1
|
||||
|
||||
- haut : monter player2
|
||||
- bas : descendre player2
|
||||
|
||||
- a : restart quand score debug
|
||||
*/
|
||||
class multiLocalGamePage
|
||||
{
|
||||
static create()
|
||||
@ -80,33 +70,19 @@ class multiLocalGamePage
|
||||
scene = null;
|
||||
}
|
||||
};
|
||||
// /////////////
|
||||
// const fps = 10; // change to 30 for 30 fps
|
||||
// const frameDuration = 1000 / fps;
|
||||
// let lastTime = 0;
|
||||
// /////////////
|
||||
|
||||
function loop(timestamp) // retirer timestamp
|
||||
function loop()
|
||||
{
|
||||
if (gameEndStatus)
|
||||
{
|
||||
renderer.setAnimationLoop(null);
|
||||
gameFinish()
|
||||
}
|
||||
// const deltaTime = timestamp - lastTime; //
|
||||
|
||||
// if (deltaTime >= frameDuration)//
|
||||
// {
|
||||
// lastTime = timestamp;//
|
||||
//
|
||||
Ball.update();
|
||||
Map.update();
|
||||
Players.update();
|
||||
if (renderer) {
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
// }
|
||||
|
||||
Ball.update();
|
||||
Map.update();
|
||||
Players.update();
|
||||
if (renderer)
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
|
||||
function gameFinish()
|
||||
|
Reference in New Issue
Block a user