fixed NPC spawning outside of road line. Moved power move buttons down.
Signed-off-by: officereso <qrs01@snowtx.com>
This commit is contained in:
parent
05eb5e46b7
commit
01de291094
@ -43,10 +43,10 @@ public class Draw extends Applet {
|
|||||||
public static void pBtn(Graphics g) {
|
public static void pBtn(Graphics g) {
|
||||||
Expo.setFont(g, "Arial", 1, 100);
|
Expo.setFont(g, "Arial", 1, 100);
|
||||||
Expo.setColor(g, Colors.pBtn);
|
Expo.setColor(g, Colors.pBtn);
|
||||||
Expo.drawString(g, "<=", 480, 400);
|
Expo.drawString(g, "<=", 480, 700);
|
||||||
Expo.drawString(g, "=>", 660, 400);
|
Expo.drawString(g, "=>", 660, 700);
|
||||||
Expo.setFont(g, "Arial", 1, 20);
|
Expo.setFont(g, "Arial", 1, 20);
|
||||||
Expo.drawString(g, "Power move! Click the buttons bellow to move five times as far!", 450, 335);
|
Expo.drawString(g, "Power move! Click the buttons bellow to move five times as far!", 450, 635);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ public class Main extends Applet {
|
|||||||
private Rectangle startBtn = new Rectangle(100, 100, 340, 600); // Rectangle that the user presses to start the game
|
private Rectangle startBtn = new Rectangle(100, 100, 340, 600); // Rectangle that the user presses to start the game
|
||||||
private Rectangle lBtn = new Rectangle(480, 240, 150, 80); // Rectangle that the player presses to move player to the left
|
private Rectangle lBtn = new Rectangle(480, 240, 150, 80); // Rectangle that the player presses to move player to the left
|
||||||
private Rectangle rBtn = new Rectangle(660, 240, 150, 80); // Rectangle that the player presses to move player to the right
|
private Rectangle rBtn = new Rectangle(660, 240, 150, 80); // Rectangle that the player presses to move player to the right
|
||||||
private Rectangle lpBtn = new Rectangle(480, 340, 150, 80); // Rectangle that the player presses to move player to the power left
|
private Rectangle lpBtn = new Rectangle(480, 640, 150, 80); // Rectangle that the player presses to move player to the power left
|
||||||
private Rectangle rpBtn = new Rectangle(660, 340, 150, 80); // Rectangle that the player presses to move player to the power right
|
private Rectangle rpBtn = new Rectangle(660, 640, 150, 80); // Rectangle that the player presses to move player to the power right
|
||||||
private boolean alive = true; // Used to stop score from increasing
|
private boolean alive = true; // Used to stop score from increasing
|
||||||
private boolean powerUsed = true; // Sets default value for power availability
|
private boolean powerUsed = true; // Sets default value for power availability
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class NPC1 extends Applet {
|
public class NPC1 extends Applet {
|
||||||
public static boolean collision = false;
|
public static boolean collision = false;
|
||||||
private static int x = Expo.random(100, 400); // Where NPC starts on road
|
private static int x = Expo.random(100, 350); // Where NPC starts on road
|
||||||
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
||||||
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class NPC2 extends Applet {
|
public class NPC2 extends Applet {
|
||||||
public static boolean collision = false;
|
public static boolean collision = false;
|
||||||
private static int x = Expo.random(100, 400); // Where NPC starts on road
|
private static int x = Expo.random(100, 350); // Where NPC starts on road
|
||||||
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
||||||
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class NPC3 extends Applet {
|
public class NPC3 extends Applet {
|
||||||
public static boolean collision = false;
|
public static boolean collision = false;
|
||||||
private static int x = Expo.random(100, 400); // Where NPC starts on road
|
private static int x = Expo.random(100, 350); // Where NPC starts on road
|
||||||
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
||||||
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class NPC4 extends Applet {
|
public class NPC4 extends Applet {
|
||||||
public static boolean collision = false;
|
public static boolean collision = false;
|
||||||
private static int x = Expo.random(100, 400); // Where NPC starts on road
|
private static int x = Expo.random(100, 350); // Where NPC starts on road
|
||||||
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
||||||
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class NPC5 extends Applet {
|
public class NPC5 extends Applet {
|
||||||
public static boolean collision = false;
|
public static boolean collision = false;
|
||||||
private static int x = Expo.random(100, 400); // Where NPC starts on road
|
private static int x = Expo.random(100, 350); // Where NPC starts on road
|
||||||
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
||||||
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class NPC6 extends Applet {
|
public class NPC6 extends Applet {
|
||||||
public static boolean collision = false;
|
public static boolean collision = false;
|
||||||
private static int x = Expo.random(100, 400); // Where NPC starts on road
|
private static int x = Expo.random(100, 350); // Where NPC starts on road
|
||||||
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
||||||
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
private static int speed = Expo.random(10, 40); // Value to move NPC down
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class NPC7 extends Applet {
|
public class NPC7 extends Applet {
|
||||||
public static boolean collision = false;
|
public static boolean collision = false;
|
||||||
private static int x = Expo.random(100, 400); // Where NPC starts on road
|
private static int x = Expo.random(100, 350); // Where NPC starts on road
|
||||||
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
private static int y = -15; // Default starting position for NPC. Negative because NPC is draw from bottom left to top right.
|
||||||
private static int speed = Expo.random(60, 100); // Value to move NPC down
|
private static int speed = Expo.random(60, 100); // Value to move NPC down
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user