-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft : Capture the flag #44
base: dev
Are you sure you want to change the base?
Conversation
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/EventListener.java
Outdated
Show resolved
Hide resolved
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/EventListener.java
Show resolved
Hide resolved
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/GameLogic.java
Outdated
Show resolved
Hide resolved
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/GameLogic.java
Outdated
Show resolved
Hide resolved
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/GameLogic.java
Outdated
Show resolved
Hide resolved
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/GameLogic.java
Outdated
Show resolved
Hide resolved
(et le nom des teams en gras bien évidemment)
Hésite pas à ajouter une cartouche en haut de tes classes pour expliquer l"utilité de chaque classe et indiquer ton nom + prénom pour être présenté en qualité d'auteur. |
(+ plus besoins de poser le drapeau pour marquer des points)
(+ messages globaux)
} | ||
} | ||
|
||
public String getTeamColorCode(String teamName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalement, tu peux récupérer la couleur d'une team avec le getTeam du Team manager.
Aussi, tu peux renommer les teams en "Rouge" et "Bleu" si tu le souhaites.
(+ commentaires au dessus des classes)
(+ stocker le rayon des bases dans une constante)
(et ne jamais le drop en dessous de la killzone)
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/CtfWinners.java
Outdated
Show resolved
Hide resolved
# Conflicts: # settings.gradle.kts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Petite review rapide que je fais sur tel, donc j'ai peut-être raté des trucs, notamment le formatage
private static final double BASE_RADIUS = 4; | ||
|
||
|
||
public GameLogic(LudosGame ludosGame1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu peux utiliser une classe record pour ne pas avoir de constructeur comme ça
* @param red_location position initiale du drapeau rouge | ||
* @param blue_location position initiale du drapeau bleu | ||
*/ | ||
public void initFlags(Location red_location, Location blue_location) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Généralement, on essaye de privilégier un seul casing pour les arguments de méthodes, il faut donc éviter le snake case occasionnel.
|
||
Material helmetSlotMaterial = helmetItem.getType(); | ||
player.entity().getInventory().clear(39); //39 = slot helmet | ||
player.entity().getInventory().clear(1); // 1 = deuxième slot hotbar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attention aux clear dans les slots quand les joueurs peuvent manipuler leur inventaire.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nbt sur items
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Au final j'ai pas fait avec les nbt, j'utilise juste inventory.remove pour retirer les drapeaux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je sais pas si c'est une bonne idée de faire ce que tu as fait avec le slot du helmet mais bon, ça devrait être bon.
games/ctf/src/main/java/fr/efreicraft/ludos/games/ctf/GameLogic.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
public void setWorld(World world1) { | ||
world = world1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je préfère que tu utilise un game point pour déterminer le monde de jeu
@Override | ||
public void beginGame() { | ||
super.beginGame(); | ||
GameTimer gt = new GameTimer(gameLogic::spawnParticles, -1, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'aurais bien vu les routines de particules dans une classe séparée avec une méthode d'initialisation des timers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je viens de le faire mais je suis vraiment pas sûr de si c'est vraiment ce que tu voulais
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est good
|
||
@Override | ||
public void postMapParse() { | ||
Map<String, ArrayList<GamePoint>> game_points = Core.get().getMapManager().getCurrentMap().getGamePoints(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas de snake case
Co-authored-by: Antoine <[email protected]>
(sauf le casque)
No description provided.