Merge
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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;
|
||||
|
||||
this.updateScore(name, this.score);
|
||||
player.reserCameraPlayer();
|
||||
ball.resetPosBall();
|
||||
this.resetPosWalls();
|
||||
// player.resetPosPlayer();
|
||||
// opponent.resetPosOpponent();
|
||||
player.resetScaleplayers();
|
||||
player.reserCameraPlayer();
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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)
|
||||
{
|
||||
const lerp = (start, end, t) => start + (end - start) * t;
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: hubourge <hubourge@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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);
|
||||
}
|
||||
|
||||
resetPosPlayer()
|
||||
{
|
||||
this.object.position.set(0, this.limits.down, mapLength / 2 - 0.2);
|
||||
}
|
||||
|
||||
reserCameraPlayer()
|
||||
{
|
||||
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)
|
||||
{
|
||||
this.mapVar.putVideoOnCanvas(3, 'goal');
|
||||
|
Reference in New Issue
Block a user