Random NPC spawns
This commit is contained in:
parent
a586fd40db
commit
83feeb11b9
@ -18,6 +18,7 @@ public class Draw extends Applet {
|
||||
public static void begin(Graphics g){
|
||||
road(g);
|
||||
LRbtn(g);
|
||||
//project.Sprites.NPC1.NPC1(g,Expo.random(110,390));
|
||||
}
|
||||
|
||||
public static void LRbtn(Graphics g){
|
||||
|
@ -38,7 +38,6 @@ public class Main extends Applet {
|
||||
|
||||
|
||||
public static void test(Graphics g){
|
||||
// put testing code and calls here
|
||||
|
||||
project.Sprites.NPC1.NPC1(g,Expo.random(100,400));
|
||||
}
|
||||
}
|
||||
|
25
src/project/Sprites/NPC1.java
Normal file
25
src/project/Sprites/NPC1.java
Normal file
@ -0,0 +1,25 @@
|
||||
package project.Sprites;
|
||||
|
||||
import project.Colors;
|
||||
import project.Expo;
|
||||
import java.applet.Applet;
|
||||
import java.awt.*;
|
||||
|
||||
public class NPC1 extends Applet {
|
||||
public static void NPC1(Graphics g, int x) {
|
||||
Expo.setColor(g,colorsTemp.NPC1Body);
|
||||
Expo.fillRectangle(g, x, 110, x+35, 170);
|
||||
Expo.setColor(g,colorsTemp.Tires);
|
||||
Expo.fillRectangle(g, x+5, 118, x-5, 138);
|
||||
Expo.fillRectangle(g, x+5, 145, x-5, 165);
|
||||
Expo.fillRectangle(g, x+30, 118, x+40, 138);
|
||||
Expo.fillRectangle(g, x+30, 145, x+40, 165);
|
||||
}
|
||||
}
|
||||
// Expo.setColor(g,colorsTemp.NPC1Body);
|
||||
// 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);
|
18
src/project/Sprites/NPC2.java
Normal file
18
src/project/Sprites/NPC2.java
Normal file
@ -0,0 +1,18 @@
|
||||
package project.Sprites;
|
||||
|
||||
import project.Colors;
|
||||
import project.Expo;
|
||||
import java.applet.Applet;
|
||||
import java.awt.*;
|
||||
|
||||
public class NPC2 extends Applet {
|
||||
public static void NPC2(Graphics g) {
|
||||
Expo.setColor(g,colorsTemp.NPC2Body);
|
||||
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);
|
||||
}
|
||||
}
|
18
src/project/Sprites/NPC3.java
Normal file
18
src/project/Sprites/NPC3.java
Normal file
@ -0,0 +1,18 @@
|
||||
package project.Sprites;
|
||||
|
||||
import project.Colors;
|
||||
import project.Expo;
|
||||
import java.applet.Applet;
|
||||
import java.awt.*;
|
||||
|
||||
public class NPC3 extends Applet {
|
||||
public static void NPC3(Graphics g) {
|
||||
Expo.setColor(g,colorsTemp.NPC3Body);
|
||||
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);
|
||||
}
|
||||
}
|
18
src/project/Sprites/NPC4.java
Normal file
18
src/project/Sprites/NPC4.java
Normal file
@ -0,0 +1,18 @@
|
||||
package project.Sprites;
|
||||
|
||||
import project.Colors;
|
||||
import project.Expo;
|
||||
import java.applet.Applet;
|
||||
import java.awt.*;
|
||||
|
||||
public class NPC4 extends Applet {
|
||||
public static void NPC4(Graphics g) {
|
||||
Expo.setColor(g,colorsTemp.NPC4Body);
|
||||
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);
|
||||
}
|
||||
}
|
18
src/project/Sprites/NPC5.java
Normal file
18
src/project/Sprites/NPC5.java
Normal file
@ -0,0 +1,18 @@
|
||||
package project.Sprites;
|
||||
|
||||
import project.Colors;
|
||||
import project.Expo;
|
||||
import java.applet.Applet;
|
||||
import java.awt.*;
|
||||
|
||||
public class NPC5 extends Applet {
|
||||
public static void NPC5(Graphics g) {
|
||||
Expo.setColor(g,colorsTemp.NPC5Body);
|
||||
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);
|
||||
}
|
||||
}
|
@ -10,4 +10,9 @@ public class colorsTemp {
|
||||
static final Color startBlue = new Color(112, 113, 255);
|
||||
static final Color playerBody = new Color(247, 17, 17);
|
||||
static final Color Tires = new Color(0, 0, 0);
|
||||
static final Color NPC1Body = new Color(0, 247, 0);
|
||||
static final Color NPC2Body = new Color(221, 247, 0);
|
||||
static final Color NPC3Body = new Color(247, 113, 0);
|
||||
static final Color NPC4Body = new Color(0, 11, 247);
|
||||
static final Color NPC5Body = new Color(247, 0, 182);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user