-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnemy.as
More file actions
42 lines (36 loc) · 705 Bytes
/
Enemy.as
File metadata and controls
42 lines (36 loc) · 705 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
40
41
42
package
{
import net.flashpunk.*;
import net.flashpunk.graphics.*;
import net.flashpunk.tweens.misc.*;
import net.flashpunk.utils.*;
import net.flashpunk.FP;
/**
* ...
* @author Bijan
*/
public class Enemy extends Entity
{
public var mLevel:Level;
public var isDead:Boolean = false;
public var sfxDie:Sfx = new Sfx(Assets.EDIESFX);
public function Enemy(locX:Number, locY:Number, currLevel:Level)
{
x = locX;
y = locY;
layer = 2;
type = "enemy";
mLevel = currLevel;
setHitbox(32, 32, 0, 0);
}
override public function update():void
{
super.update();
}
public function destroy():void
{
sfxDie.play();
isDead = true;
}
}
}