-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowerUp.java
More file actions
95 lines (53 loc) · 1.41 KB
/
Copy pathPowerUp.java
File metadata and controls
95 lines (53 loc) · 1.41 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package com.smiths;
//power up sub
import org.andengine.entity.primitive.Rectangle;
import org.andengine.opengl.texture.region.TiledTextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;
public class PowerUp extends GameObject {
public Rectangle bodyRect;
public int powerupType;
public int isBlank= 0;
public int isExtraNinja= 1;
public int isHealth=2;
public int isShurikensPowerUp = 3;
public int isSmokebomb = 4;
public int isSlowmo = 5;
public int isSuperHealth= 6;
public int isHadokenBuff = 7;
public int isGoldCoin= 8;
public int isLevelUp = 9;
public int hit = 0;
public int cycletimer = 0;
public boolean disabled = true;
public boolean chestitemdropped = false;
public int chesttimer =0;
public boolean chestIsOpen = false;
public PowerUp( int x, int y,TiledTextureRegion texture, VertexBufferObjectManager OM)
{
super(x, y, texture, OM);
bodyRect = new Rectangle(10, 10, 44,44,OM);
this.attachChild(bodyRect);
bodyRect.setVisible(false);
this.setVisible(true);
this.powerupType=0;
}
public int Offset() {
int Yoffset = ((int)this.getHeightScaled()-1);
return Yoffset;
}
public void reset()
{
this.setVisible(true);
this.powerupType=0;
this.timer=0;
this.hit = 0;
}
public void collect()
{
this.setVisible(false);
this.powerupType=0;
this.timer=0;
this.hit = 0;
this.detachSelf();
}
}