-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLevel Two
68 lines (57 loc) · 1.83 KB
/
Level Two
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package wave;
import org.lwjgl.input.Mouse;
import java.awt.Font;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.TrueTypeFont;
import org.newdawn.slick.geom.Vector2f;
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;
import grid.Waypoint;
import main.Game;
import java.util.*;
import playerObjects.*;
public class LevelOne {
static int i = 0;
static float x = 0;
static float y = 0;
static float tot = 0;
static Enemy e;
static ArrayList<Enemy> es;
static Enemy[] wave = new Enemy[30];
public static ArrayList<Enemy> levelTwo(int milli) throws FileNotFoundException, IOException
{
Vector2f startingLoc = new Vector2f(46, 46);
tot += milli;
Vector2f vel = new Vector2f(38, 38);
//?
if(i == 0) {
Texture Elfy = TextureLoader.getTexture("png", new FileInputStream(new File("./res/HouseElf.png")));
Vector2f size = new Vector2f(1, 1);
Icon img = new Icon(new Image(Elfy), size);
Vector2f loc = startingLoc;
int length = wave.length;
for(int j = 0; j< length / 2; j++) {
wave[j] = new HouseElf(loc, vel, size, img);
}
Texture Centaury = TextureLoader.getTexture("png", new FileInputStream(new File("./res/HouseElf.png")));
Icon imgTwo = new Icon(new Image(Elfy), size);
for(int k = 0; k < length / 2; k++) {
wave[(length / 2) + k] = new Centaur(loc, vel, size, imgTwo);
}
}
ArrayList<Enemy> es = new ArrayList<Enemy>();
for(Enemy e: wave) {
es.add(e);
}
return es;
}
}