-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLevelSlope.java
More file actions
62 lines (32 loc) · 1.11 KB
/
Copy pathLevelSlope.java
File metadata and controls
62 lines (32 loc) · 1.11 KB
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
package com.smiths;
import java.util.ArrayList;
import org.andengine.entity.primitive.Rectangle;
import org.andengine.entity.scene.Scene;
import org.andengine.opengl.vbo.VertexBufferObjectManager;
import org.andengine.util.color.Color;
//level definition
public class LevelSlope
{
public LevelSlope(VertexBufferObjectManager VBO, Scene scene, ArrayList<Rectangle> horizontals, ArrayList<Rectangle> verticals )
{
verticals.add(new Rectangle(-1000,-1000,1000,1500,VBO));
verticals.add(new Rectangle(500,-1000,850,1500,VBO));
horizontals.add(new Rectangle(-1000, 300, 20000, 512, VBO));
for(int i=0; i<horizontals.size(); i++)
{
scene.attachChild(horizontals.get(i));
horizontals.get(i).setColor(Color.BLACK);
}
for(int i=0; i<verticals.size(); i++)
{
scene.attachChild(verticals.get(i));
verticals.get(i).setColor(Color.BLACK);
}
Rectangle spun = new Rectangle(250,200,200,200, VBO);
horizontals.add(spun);
spun.setRotationCenter(100, 100);
spun.setRotation(45);
scene.attachChild(spun);
spun.setColor(Color.BLACK);
}
}