class Page { PFont generalFont; PImage titleImage, timImage, albertImage, christianImage, katieImage, tonyImage; //images needed throughtout the game int orange = color (235, 136, 55); int skyBlue = color (10, 89, 158); //Images & Title for the title page Page() { generalFont = loadFont("8bitoperator-JVE-48.vlw"); titleImage = loadImage("title.png"); timImage = loadImage("tim.png"); albertImage = loadImage("albert.png"); christianImage = loadImage("christian.png"); katieImage = loadImage("katie.png"); tonyImage = loadImage("tony.png"); background(0); } //Displaying Menu void displayMenu () { textAlign(CENTER); fill(orange); textFont(generalFont); text("Dodge! Dodge! Beam!", width/2, 80); image(titleImage, 600, height/2-140); } //Displaying the instructions void displayInstructions() { textAlign(CENTER); fill(orange); textFont(generalFont); text("Instructions", width/2, 80); textAlign(LEFT); fill(255); textFont(generalFont, 30); text("- Use the Slider to move the aircraft\n- Use the Shoot button to shoot the laser\n- Use the Super Shoot button to shoot the super weapon\n- The goal of the game is eliminate the opponent's aircraft\n- There are two types of super weapon, Shield and Missile\n- There will be 2 Shields and 2 Missiles that are hidden in the blocks", 50, 170); } //Displaying the credits page void displayCredits() { textAlign(CENTER); fill(orange); textFont(generalFont); text("Credits", width/2, 80); textAlign(LEFT); fill(255); textFont(generalFont, 30); text("IAT267 FALL 2011", 50, 170); image(timImage, 20, 300); image(christianImage, 220, 300); image(katieImage, 420, 300); image(tonyImage, 620, 300); image(albertImage, 820, 300); fill(skyBlue); text("Tim Heng", 40, 520); text("Christian AKL", 240, 520); text("Katie Chau", 440, 520); text("Tony Luo", 640, 520); text("Albert Lin", 840, 520); } //Displaying the page where the players enter their names void displayNames() { textAlign(CENTER); fill(orange); textFont(generalFont); text("Please enter your names", width/2, 80); textAlign(LEFT); fill(255); textFont(generalFont, 30); text("Player 1:", 100, height/2-50); text("Player 2:", 100, height/2+50); } //In case the players entered invalid names void displayWarning() { textAlign(CENTER); fill(255, 0, 0); textFont(generalFont); text("Please enter the names of the players!", width/2, height-100); } //Displaying the victory sentence void displayVictory() { textAlign(CENTER); fill(255); textFont(generalFont); text("VICTORY!!!", width/2, height/2-100); } }