-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAngel.java
More file actions
39 lines (27 loc) · 738 Bytes
/
Copy pathAngel.java
File metadata and controls
39 lines (27 loc) · 738 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
35
36
37
38
39
package com.smiths;
//angel sub
import org.andengine.entity.primitive.Rectangle;
import org.andengine.opengl.texture.region.TiledTextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;
public class Angel extends GameObject {
public Rectangle bodyRect;
public Angel( int x, int y,TiledTextureRegion texture, VertexBufferObjectManager OM)//, float scale)
{
super( x, y,texture, OM);
bodyRect = new Rectangle(20, 16, 16,48,OM);
this.attachChild(bodyRect);
self.setVisible(false);
bodyRect.setVisible(false);
this.setVisible(true);
}
public void collect()
{
this.setVisible(false);
this.stopAnimation();
this.detachSelf();
}
public void reset()
{
this.setVisible(true);
}
}