Merge
This commit is contained in:
@ -3,10 +3,10 @@
|
|||||||
/* ::: :::::::: */
|
/* ::: :::::::: */
|
||||||
/* main.js :+: :+: :+: */
|
/* main.js :+: :+: :+: */
|
||||||
/* +:+ +:+ +:+ */
|
/* +:+ +:+ +:+ */
|
||||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/22 17:08:46 by madegryc #+# #+# */
|
/* Created: 2024/08/22 17:08:46 by madegryc #+# #+# */
|
||||||
/* Updated: 2024/10/01 15:12:03 by edbernar ### ########.fr */
|
/* Updated: 2024/10/01 18:48:13 by hubourge ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/20 14:52:55 by hubourge #+# #+# */
|
/* Created: 2024/08/20 14:52:55 by hubourge #+# #+# */
|
||||||
/* Updated: 2024/09/30 18:13:05 by hubourge ### ########.fr */
|
/* Updated: 2024/10/01 18:45:17 by hubourge ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -1033,11 +1033,10 @@ class Map
|
|||||||
animationSpeed = 0.02;
|
animationSpeed = 0.02;
|
||||||
|
|
||||||
this.updateScore(name, this.score);
|
this.updateScore(name, this.score);
|
||||||
player.reserCameraPlayer();
|
|
||||||
ball.resetPosBall();
|
ball.resetPosBall();
|
||||||
this.resetPosWalls();
|
this.resetPosWalls();
|
||||||
// player.resetPosPlayer();
|
player.resetScaleplayers();
|
||||||
// opponent.resetPosOpponent();
|
player.reserCameraPlayer();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/21 10:34:49 by edbernar #+# #+# */
|
/* Created: 2024/08/21 10:34:49 by edbernar #+# #+# */
|
||||||
/* Updated: 2024/09/25 15:29:52 by hubourge ### ########.fr */
|
/* Updated: 2024/10/01 15:28:00 by hubourge ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -50,11 +50,6 @@ class Opponent
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
resetPosOpponent()
|
|
||||||
{
|
|
||||||
this.object.position.set(0, 0.3, -mapLength / 2 + 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
movePlayer(content)
|
movePlayer(content)
|
||||||
{
|
{
|
||||||
const lerp = (start, end, t) => start + (end - start) * t;
|
const lerp = (start, end, t) => start + (end - start) * t;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/08/18 00:30:31 by edbernar #+# #+# */
|
/* Created: 2024/08/18 00:30:31 by edbernar #+# #+# */
|
||||||
/* Updated: 2024/09/30 16:48:22 by hubourge ### ########.fr */
|
/* Updated: 2024/10/01 18:45:39 by hubourge ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -106,11 +106,6 @@ class Player
|
|||||||
clearInterval(this.interval);
|
clearInterval(this.interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
resetPosPlayer()
|
|
||||||
{
|
|
||||||
this.object.position.set(0, this.limits.down, mapLength / 2 - 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
reserCameraPlayer()
|
reserCameraPlayer()
|
||||||
{
|
{
|
||||||
this.setCameraPosition(
|
this.setCameraPosition(
|
||||||
@ -120,6 +115,13 @@ class Player
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetScaleplayers()
|
||||||
|
{
|
||||||
|
this.object.scale.set(1, 1, 1);
|
||||||
|
if (this.opponent)
|
||||||
|
this.opponent.object.scale.set(1, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
makeAnimation(isOpponent)
|
makeAnimation(isOpponent)
|
||||||
{
|
{
|
||||||
this.mapVar.putVideoOnCanvas(3, 'goal');
|
this.mapVar.putVideoOnCanvas(3, 'goal');
|
||||||
|
Reference in New Issue
Block a user