-
Notifications
You must be signed in to change notification settings - Fork 0
/
Malware.as
44 lines (36 loc) · 1.71 KB
/
Malware.as
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
package classes {
import starling.events.Event;
public class Malware extends Combatant{
public var idleMc:SuperMovieClip = new SuperMovieClip('malwareIdle', GV.COMBATANT_SPRITESHEET);
public var movementMc:SuperMovieClip = new SuperMovieClip('malwareMoving', GV.COMBATANT_SPRITESHEET);
public var meleeMc:SuperMovieClip = new SuperMovieClip('malwareMelee', GV.COMBATANT_SPRITESHEET, -65);
public var blockMc:SuperMovieClip = new SuperMovieClip('malwareBlock', GV.COMBATANT_SPRITESHEET, -31);
public function Malware(){
blockMc.loop = false;
meleeMc.addEventListener(Event.COMPLETE, moveBackToOurTile);
introMessage = introMessageRandomizer(new <String>["Infect it all.", "Why was I made?", "You look too clean.", "Malicious? Do I look malicious?"]);
}
public function uniqueAi():void{
movementAI();
attackAI();
startAbility(slots[GREEN]);
}
public function uniqueNullItAll():void{
superNull(idleMc); idleMc = null;
superNull(movementMc); movementMc = null;
superNull(meleeMc); meleeMc = null;
superNull(blockMc); blockMc = null;
}
public function uniqueMoveSoundPlay():void{FX.playSlimeMove();}
public function uniqueMoveSoundStop():void{FX.stopSlimeMove();}
public function uniqueMovementAnimation():void{ if(GV.arena.inAction) changeAnimation(movementMc);}
public function uniqueIdleAnimation():void{changeAnimation(idleMc); blocking = false;}
public function meleeAnimation():void{changeAnimation(meleeMc); FX.squish1.play(GV.AUDIO_START_TIME, 0, GV.sfx);}
public function defenseIdleAnimation():void{
blocking = true;
FX.squish2.play(GV.AUDIO_START_TIME, 0, GV.sfx);
FX.showParticleEffect(FX.slimeySplashPool, x, y, 0.1);
changeAnimation(blockMc);
}
}
}