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
Commits
feb7c447
Commit
feb7c447
authored
2 years ago
by
Azurlors
Browse files
Options
Downloads
Patches
Plain Diff
petit changement cam
parent
0fff33bf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MAVENProject/src/main/java/jeu/Painter.java
+8
-5
8 additions, 5 deletions
MAVENProject/src/main/java/jeu/Painter.java
with
8 additions
and
5 deletions
MAVENProject/src/main/java/jeu/Painter.java
+
8
−
5
View file @
feb7c447
...
...
@@ -32,19 +32,16 @@ public class Painter implements GamePainter{
private
static
Coordonnees
coordonneesCam
;
public
int
xCam
;
public
int
zCam
;
private
int
decalage
=
2
2
5
;
private
int
decalage
=
2
5
5
;
// decalage Cam bas pour perso
private
Painter
painter
;
public
Painter
()
{
}
@Override
public
void
draw
(
BufferedImage
im
)
{
coordonneesCam
=
gameCharacter
.
getCoord
();
xCam
=
-
WIDTH
/
2
+
(
int
)
coordonneesCam
.
getX
();
zCam
=
-
HEIGHT
/
2
+(
int
)
coordonneesCam
.
getZ
()-
decalage
;
cameraUse
();
Graphics2D
crayon
=
(
Graphics2D
)
im
.
getGraphics
();
crayon
.
setColor
(
Color
.
blue
);
...
...
@@ -199,6 +196,12 @@ public class Painter implements GamePainter{
}
}
private
void
cameraUse
(){
coordonneesCam
=
gameCharacter
.
getCoord
();
xCam
=
-
WIDTH
/
2
+
(
int
)
coordonneesCam
.
getX
();
zCam
=
-
HEIGHT
/
2
+(
int
)
coordonneesCam
.
getZ
()-
decalage
;
}
@Override
public
int
getWidth
()
{
return
WIDTH
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment