top of page

Etat du Code

Liens vers le drive contenant l'état actuel du code : 

​

​

​

CODE EN BAS

​

​

​

​

Jeu:

​

//Utiliser les touches 'z', 'q', 's', et 'd' du clavier pour déplacer ISN GUY
//Appuyez sur le click gauche de la sourie pour tirer

PImage Sourie;

boolean MenuPrincipal = true;
boolean EnPartie = false;
boolean Options = false;

PFont font;

int TicChangementDeNiveau=0;
int TicGameOver=0;

//---------------------------------------------------------------------------------------------------------------------------------------


void settings() {
  fullScreen();
}

//---------------------------------------------------------------------------------------------------------------------------------------


void setup() {
  background(#000000);
  font = loadFont("ACaslonPro-Bold-48.vlw");

  pushStyle();
  fill(#FF0000);
  textAlign(CENTER);
  text("CHARGEMENT...", width/2, height/2);
  popStyle();

  CreationDeNiveau();
  balleEnnemiSniper=loadImage("Balles Sniper.png");
  balleEnnemiMage=loadImage("Balles Mage.png");
  balleEnnemiSimple=loadImage("Balles Ennemi.png");
  balle=loadImage("Balles.png");
  SetupAnimations();
  TextureWall = loadImage("WallTexture3.png");
  TextureFloor = loadImage("FloorTexture2.png");


  Sourie =loadImage("Viseur.png");
  cursor(Sourie, 16, 16);

  Fenetre = new DeuxiemeFenetre();

  CreationDeNiveau();

  SetupDuMenu();
  //setupDuSon();
}

//---------------------------------------------------------------------------------------------------------------------------------------

void draw() {
  if (MenuPrincipal) {
    Menu();
  }

  if (EnPartie) {
    if (changement) {
      ChangerDeNiveau();
    } else {
      Partie();
      if (NouvelleVague) {
        InvoquerBOTsDuNiveau();
      } else if (NumeroBOT==0) {
        TicChangementDeNiveau++;
        pushStyle();
        fill(#FF0000);
        textFont(font);
        textAlign(CENTER);
        text("Chargement Du Prochain Niveau...", width/2, height/2);
        CreationDeNiveau();
        popStyle();
        if (TicChangementDeNiveau==2) {
          ProchainNiveau();
          TicChangementDeNiveau=0;
        }
      }
    }
    if (ViesISNGuy<1) {
      MortISNGuy();
    }
  }

  if (Options) {
    MenuOption();
  }
}

//---------------------------------------------------------------------------------------------------------------------------------------

void Partie() {
  Fond();
  tireurSimple.update();
  tireurDelite.update();
  sniper.update();
  miniBoss.update();
  mage.update();
  balles.update(NombreTir);
  ControllerISNGuy();
  GUI();
  //MusiquePartie();
}

//---------------------------------------------------------------------------------------------------------------------------------------

void MortISNGuy() {
  TicGameOver++;
  pushStyle();
  fill(#FF0000);
  textFont(font);
  textAlign(CENTER);
  text("GAME OVER!!!", width/2, height/2);
  popStyle();
  if (TicGameOver==5) {
    delay(5000);
    EnPartie=false;
    MenuPrincipal=true;
    ViesISNGuy=10;
    NumeroBOT=0;
  }
}

Lycée B.Palissy

164 Bd de la Liberté

47000 Agen

© 2018 usethfrogsluke . ecole du baguette Créé avec Wix.com

 

bottom of page