forked from StRobertCHSCS/ICS4U-PCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBrick
More file actions
34 lines (23 loc) · 659 Bytes
/
Brick
File metadata and controls
34 lines (23 loc) · 659 Bytes
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
package com.example.luimi.breakout;
import android.graphics.RectF;
public class Brick {
private RectF rect;
private boolean isVisible;
public Brick(int row, int column, int width, int height){
isVisible = true;
int padding = 1;
rect = new RectF(column * width + padding,
row * height + padding,
column * width + width - padding,
row * height + height - padding);
}
public RectF getRect(){
return this.rect;
}
public void setInvisible(){
isVisible = false;
}
public boolean getVisibility(){
return isVisible;
}
}