Skip to content
Snippets Groups Projects
Commit 58c0a196 authored by Azurlors's avatar Azurlors
Browse files

Raloum

parent eaacfe7c
Branches
No related tags found
No related merge requests found
......@@ -12,6 +12,8 @@ import java.util.Map;
import entity.Character;
import engine.Game;
import environnement.Coordonnees;
import environnement.HitBox;
import environnement.Obstacle;
import loaders.CharacterLoader;
......@@ -30,6 +32,8 @@ public class Jeu implements Game{
int nbBeforeFramechgt = nbIterationPerFrame;
//private boolean characterNotMoving = true;
private boolean characterAttacking = false; //boolean necessaire pour rendre l'animation d'attaque prioritaire
public static Obstacle sol = new Obstacle(new HitBox(new Coordonnees(200,700),1,1000000));
public Jeu(String source) {
......
......@@ -11,9 +11,8 @@ import java.awt.image.BufferedImage;
import java.util.HashMap;
import static environnement.HitBox.collision;
import static jeu.Jeu.gameCharacter;
import static jeu.Jeu.gameCharacterLoader;
import static jeu.Jeu.getCoordSol;
import static jeu.Jeu.*;
public class Painter implements GamePainter{
......@@ -30,8 +29,8 @@ public class Painter implements GamePainter{
public void draw(BufferedImage im) {
Graphics2D crayon = (Graphics2D) im.getGraphics();
crayon.setColor(Color.blue);
drawCharacter(crayon, gameCharacter,gameCharacterLoader.getImageCharacter());
drawSol(crayon);
drawCharacter(crayon,gameCharacterLoader.getImageCharacter());
drawObstacle(crayon, sol);
if (!collision(gameCharacter.getHitBox(), test.getHitbox())){
crayon.setColor(Color.blue);
}
......@@ -53,7 +52,7 @@ public class Painter implements GamePainter{
return HEIGHT;
}
private void drawCharacter(Graphics2D crayon, Character charac,Image imageCharac){
private void drawCharacter(Graphics2D crayon,Image imageCharac){
int x = (int) gameCharacter.getCoord().getX();
int y = (int) gameCharacter.getCoord().getZ();
//crayon.fillRect(x-15,y-30, (int) gameCharacter.getEntityWIDTH(),(int) gameCharacter.getEntityHEIGHT());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment