/
Boom.java
46 lines (35 loc) · 924 Bytes
/
Boom.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
package com.lud.root.jetfighter;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
public class Boom {
private Bitmap bitmap;
private int x,y;
public Boom(Context context){
//get the image from drawable
bitmap = BitmapFactory.decodeResource(context.getResources(),R.drawable.boom);
//set the coordinate outside the screen so that it won't be
//shown on the screen
//it will be visible for only a fraction of a second
x = -250;
y = -250;
}
public int getY() {
return y;
}
public int getX() {
return x;
}
public Bitmap getBitmap() {
return bitmap;
}
public void setBitmap(Bitmap bitmap){
this.bitmap = bitmap;
}
public void setY(int y) {
this.y = y;
}
public void setX(int x) {
this.x = x;
}
}