push for team
Signed-off-by: qsnow1845 <qrs01@snowtx.com>
This commit is contained in:
parent
322bc0c97b
commit
a586fd40db
@ -1,3 +1,5 @@
|
|||||||
|
// This module was made by Quentin Snow
|
||||||
|
|
||||||
package project;
|
package project;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -13,28 +13,19 @@ public class Draw extends Applet {
|
|||||||
Expo.setFont(g,"Default",1,100-i);
|
Expo.setFont(g,"Default",1,100-i);
|
||||||
Expo.drawString(g,"START",100+i*5,200+i*7);
|
Expo.drawString(g,"START",100+i*5,200+i*7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void begin(Graphics g){
|
public static void begin(Graphics g){
|
||||||
road(g);
|
road(g);
|
||||||
moveTest(g);
|
LRbtn(g);
|
||||||
}
|
|
||||||
public static void moveTest(Graphics g){
|
|
||||||
int x = 0;
|
|
||||||
while (true){
|
|
||||||
player(g,x,200);
|
|
||||||
Expo.delay(1);
|
|
||||||
x ++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static void player(Graphics g, int x, int y){
|
|
||||||
Expo.drawPoint(g,x,y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void LRbtn(Graphics g){
|
||||||
|
Expo.setFont(g,"Default",1,100);
|
||||||
|
Expo.setColor(g,Colors.startBlue);
|
||||||
|
Expo.drawString(g,"<=",480,300);
|
||||||
|
Expo.drawString(g,"=>",620,300);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void road(Graphics g){
|
public static void road(Graphics g){
|
||||||
|
@ -7,23 +7,32 @@ import java.awt.*;
|
|||||||
public class Main extends Applet {
|
public class Main extends Applet {
|
||||||
public static boolean start = false;
|
public static boolean start = false;
|
||||||
private Rectangle startBtn = new Rectangle(100,100,340,600);
|
private Rectangle startBtn = new Rectangle(100,100,340,600);
|
||||||
|
private Rectangle Lbtn = new Rectangle(100,100,340,600);
|
||||||
|
private Rectangle Rbtn = new Rectangle(100,100,340,600);
|
||||||
|
|
||||||
public void paint(Graphics g){
|
public void paint(Graphics g){
|
||||||
test(g);
|
test(g);
|
||||||
Expo.drawHeading(g, "Quentin Snow and Alekkai", "Final Project");
|
Expo.drawHeading(g, "Quentin Snow and Alekkai", "Final Project");
|
||||||
if (start){
|
if (start){
|
||||||
Draw.begin(g);
|
Draw.begin(g);
|
||||||
|
playerLocomotion(g);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
Draw.startScreen(g);
|
Draw.startScreen(g);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void playerLocomotion(Graphics g){
|
||||||
|
project.Sprites.player.make(g,124,427);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean mouseDown(Event e, int x, int y){
|
public boolean mouseDown(Event e, int x, int y){
|
||||||
if (startBtn.inside(x,y)){
|
if (startBtn.inside(x,y)){
|
||||||
start = true;
|
start = true;
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
if (Lbtn.inside(x,y))
|
||||||
|
System.out.println(x+" "+y);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,13 +6,20 @@ import java.applet.Applet;
|
|||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
public class player extends Applet {
|
public class player extends Applet {
|
||||||
public static void make(Graphics g) {
|
public static void make(Graphics g, int x, int y) {
|
||||||
Expo.setColor(g,colorsTemp.playerBody);
|
Expo.setColor(g,colorsTemp.playerBody);
|
||||||
Expo.fillRectangle(g, 100, 100, 135, 160);
|
Expo.fillRectangle(g, x, y, x+35, y+60);
|
||||||
Expo.setColor(g,colorsTemp.Tires);
|
Expo.setColor(g,colorsTemp.Tires);
|
||||||
Expo.fillRectangle(g, 105, 108, 95, 128);
|
Expo.fillRectangle(g, x+5, y+8, x-5, y+28);
|
||||||
Expo.fillRectangle(g, 105, 135, 95, 155);
|
Expo.fillRectangle(g, x+5, y+35, x-5, y+55);
|
||||||
Expo.fillRectangle(g, 130, 108, 140, 128);
|
Expo.fillRectangle(g, x+30, y+8, x+40, y+28);
|
||||||
Expo.fillRectangle(g, 130, 135, 140, 155);
|
Expo.fillRectangle(g, x+30, y+35, x+40, y+55);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Expo.setColor(g,colorsTemp.playerBody);
|
||||||
|
// Expo.fillRectangle(g, 100, 100, 135, 160);
|
||||||
|
// Expo.setColor(g,colorsTemp.Tires);
|
||||||
|
// Expo.fillRectangle(g, 105, 108, 95, 128);
|
||||||
|
// Expo.fillRectangle(g, 105, 135, 95, 155);
|
||||||
|
// Expo.fillRectangle(g, 130, 108, 140, 128);
|
||||||
|
// Expo.fillRectangle(g, 130, 135, 140, 155);
|
Loading…
x
Reference in New Issue
Block a user