-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuilding.java
53 lines (45 loc) · 1.25 KB
/
Building.java
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
package ca.spiralmachines.limbscyberpunk;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Rect;
public class Building {
private Bitmap bitmap;
private Color color;
public Map map;
public Rect rect;
private int squareLength;
public Building(Map paramMap, int paramInt) {
this.map = paramMap;
this.squareLength = paramInt;
this.rect = new Rect(0, 0, 1, 1);
updateRect();
}
public void updateRect() {
byte b4 = 0;
byte b2 = 0;
byte b3 = 1;
byte b1 = 1;
int m = b4;
int k = b2;
int j = b3;
int i = b1;
if (this.map.rows.size() > 0) {
m = b4;
k = b2;
j = b3;
i = b1;
if (((Row)this.map.rows.get(0)).blockPoints.size() > 0) {
BlockPoint blockPoint2 = ((Row)this.map.rows.get(0)).blockPoints.get(0);
BlockPoint blockPoint1 = ((Row)this.map.rows.get(this.map.rows.size() - 1)).blockPoints.get(((Row)this.map.rows.get(0)).blockPoints.size() - 1);
m = blockPoint2.x;
k = blockPoint2.y;
j = blockPoint1.x + this.squareLength;
i = blockPoint1.y + this.squareLength;
}
}
this.rect.left = m;
this.rect.right = j;
this.rect.top = k;
this.rect.bottom = i;
}
}