Skip to content
Snippets Groups Projects
Commit ebb4f677 authored by Villard PierreFrederic's avatar Villard PierreFrederic
Browse files

Activate or not the subjective view

parent bd687c80
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,8 @@ import physique.ObjetHeros;
public class Repere {
public static boolean isSubjective=true;
//besoin d'un lien vers le heros
//vue subjective
......@@ -39,12 +41,19 @@ public class Repere {
*/
public static int[] changeRepere(Objet o)
{
int res[]=new int[4];
res[0]=100+ (int)o.px - (int)h.px;
res[1]= 370 - (int)o.py - (int)(o.height);
res[2]= (int)o.width;
res[3]= (int)o.height;
return(res);
int res[]=new int[4];
res[1]= 370 - (int)o.py - (int)(o.height);
res[2]= (int)o.width;
res[3]= (int)o.height;
if(isSubjective)
{
res[0]=100+ (int)o.px - (int)h.px;
}
else{
res[0]= (int)o.px;
}
return(res);
}
}
......@@ -16,6 +16,7 @@
import miscellaneous.MurCool;
import afficheur.Afficheur;
import afficheur.Repere;
import controle.ControleurClavier;
import physique.Monde;
import physique.MoteurPhysique;
......@@ -95,6 +96,8 @@ public class testMario {
maBoucle.jeuPhysique.moteurPhys=moteurPhys;
// Change l'image de fond
affiche.decor.changeImage("background2.jpg");
// Passage à une vue non subjective
Repere.isSubjective=true;
// Test to change the image
//monMonde.balle.sprites.assignNewImage("hero2.png");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment