Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ISN 2022-ACL project Cyberpac 2077
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
RICHARD Florian
ISN 2022-ACL project Cyberpac 2077
Merge requests
!1
Key
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Key
key
into
main
Overview
0
Commits
3
Pipelines
0
Changes
2
Merged
LACOTE Bruno
requested to merge
key
into
main
2 years ago
Overview
0
Commits
3
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
main
version 1
ba4a63a1
2 years ago
main (base)
and
latest version
latest version
2e4cb83c
3 commits,
2 years ago
version 1
ba4a63a1
2 commits,
2 years ago
2 files
+
24
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
MAVENProject/src/main/java/entity/Character.java
+
17
−
1
Options
@@ -13,9 +13,12 @@ import static environnement.PositionCollision.*;
import
environnement.PositionCollision
;
import
jeu.Jeu
;
import
map.Obstacle
;
import
map.Coffre
;
import
static
jeu
.
Jeu
.
getObstacleTable
;
//import static jeu.Jeu.gameCharacter;
import
static
jeu
.
Jeu
.
getCoffreTable
;
public
class
Character
extends
Entity
{
@@ -23,7 +26,8 @@ public class Character extends Entity{
private
double
vitesseActuZ
=
0
;
private
final
double
impulsionSaut
;
private
double
masse
;
private
int
clef
;
public
int
key
;
private
Map
<
String
,
Double
>
tableCommande
;
//table des commandes du perso
private
Obstacle
obstacleBeneath
=
Jeu
.
sol
;
@@ -126,6 +130,18 @@ public class Character extends Entity{
}
}
}
public
void
keyGestion
()
{
for
(
Coffre
cof
:
Jeu
.
getCoffreTable
()){
if
(
collision
(
this
.
getHitBox
(),
cof
.
getHitbox
())){
if
(
cof
.
key
==
true
)
{
this
.
key
+=
1
;
cof
.
key
=
false
;
System
.
out
.
print
(
"Tu as trouvé une clée!"
);
}
}
}
}
public
List
<
Obstacle
>
obstacleInVoisinage
(){
//recupere la liste des obstacles presents dans le voisinage
List
<
Obstacle
>
liste
=
new
ArrayList
<>();
Loading