- reset ball position when goal
Site
    - starting settings
This commit is contained in:
Kum1ta
2024-09-25 17:08:50 +02:00
parent 859158e9b9
commit d78fcd7cda
9 changed files with 200 additions and 6 deletions

View File

@ -6,12 +6,13 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/25 00:00:21 by edbernar #+# #+# */
/* Updated: 2024/09/25 15:47:22 by edbernar ### ########.fr */
/* Updated: 2024/09/25 17:01:12 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */
import { MultiOnlineGamePage } from "/static/javascript/multiOnlineGame/multiOnlineGamePage.js"
import { multiLocalGamePage } from "/static/javascript/multiLocalGame/multiLocalGamePage.js"
import { settingsPage } from "/static/javascript/settingsPage/settingsPage.js"
import { WaitingGamePage } from "/static/javascript/waitingGame/main.js"
import { ProfilPage } from "/static/javascript/profilPage/main.js";
import { LobbyPage } from "/static/javascript/lobbyPage/main.js";
@ -28,6 +29,7 @@ class Page
{suffix: false, url:'/wait_game', servUrl: '/waitingGamePage', class: WaitingGamePage, name: 'waitingGamePage', title: 'METH - Wait for a game'},
{suffix: false, url:'/game', servUrl: '/multiOnlineGamePage', class: MultiOnlineGamePage, name: 'multiOnlineGamePage', title: 'METH - Game'},
{suffix: true, url:'/profil', servUrl: '/profilPage', class: ProfilPage, name: 'profilPage', title: 'METH - Profil'},
{suffix: false, url:'/settings', servUrl: '/settingsPage', class: settingsPage, name: 'settingsPage', title: 'METH - Settings'},
]
constructor()

View File

@ -6,7 +6,7 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/20 14:52:55 by hubourge #+# #+# */
/* Updated: 2024/09/25 13:58:28 by edbernar ### ########.fr */
/* Updated: 2024/09/25 17:07:57 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */
@ -841,7 +841,7 @@ class Map
activeJumper(index)
{
ball.changeGravity();
if (listObject[index].isUp)
if (this.arrObject[index].isUp)
this.#animationGravityChanger(this.arrObject[index].mesh, true);
else
this.#animationGravityChanger(this.arrObject[index].mesh, false);
@ -1021,7 +1021,7 @@ class Map
this.updateScore(name, this.score);
player.reserCameraPlayer();
// ball.resetScaleBall();
ball.resetScaleBall();
// player.resetPosPlayer();
// opponent.resetPosOpponent();
};

View File

@ -6,7 +6,7 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/18 00:53:53 by edbernar #+# #+# */
/* Updated: 2024/09/25 15:22:28 by edbernar ### ########.fr */
/* Updated: 2024/09/25 17:07:14 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */

View File

@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* settingsPage.js :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/25 17:00:35 by edbernar #+# #+# */
/* Updated: 2024/09/25 17:01:06 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */
class settingsPage
{
static create()
{
}
static dispose()
{
}
}
export { settingsPage };

View File

@ -0,0 +1,102 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#settingsBody {
background-color: #020202;
color: white;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: "Poppins", sans-serif;
font-weight: 500;
font-style: normal;
}
#settingsBody .container-settings {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
width: 60%;
padding: 20px;
}
#settingsBody .left-section,
#settingsBody .right-section {
display: flex;
flex-direction: column;
}
#settingsBody .form-group-settings {
display: flex;
flex-direction: column;
margin-bottom: 20px;
}
#settingsBody label {
margin-bottom: 5px;
}
#settingsBody input {
padding: 20px;
margin-bottom: 5px;
border: none;
background-color: white;
font-family: "Poppins", sans-serif;
font-weight: 500;
font-style: normal;
}
#settingsBody button{
font-family: "Poppins", sans-serif;
font-weight: 500;
font-style: normal;
}
#settingsBody button.save-btn-settings {
padding: 10px;
background-color: white;
color: #020202;
border: none;
cursor: pointer;
margin-top: 5px;
min-width: 100px;
transition: 0.3s ease;
}
#settingsBody button.save-btn-settings:hover {
transform: scale(1.1);
}
#settingsBody button.delete-btn {
padding: 10px;
width: 50%;
background-color: #D94343;
color: white;
border: none;
cursor: pointer;
margin-top: 20px;
margin-left: auto;
transition: 0.3s ease;
}
#settingsBody button.delete-btn:hover {
transform: scale(1.1);
}
#settingsBody .form-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 5px;
}
#settingsBody small {
font-size: 13px;
color: #999;
margin-right: 10px;
margin-top: 5px;
}