-
Notifications
You must be signed in to change notification settings - Fork 0
/
OmegaPenguin.as
69 lines (56 loc) · 1.78 KB
/
OmegaPenguin.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
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
package classes {
import flash.utils.*;
import dragonBones.events.AnimationEvent;
public class OmegaPenguin extends ArmatureCombatant {
//public var idleMc:SuperMovieClip = new SuperMovieClip('penguinIdle', GV.COMBATANT_SPRITESHEET);
//public var gazeMc:SuperMovieClip = new SuperMovieClip('penguinGaze', GV.COMBATANT_SPRITESHEET, 0, -5, false);
[Embed(source = "../omegaPenguin.png", mimeType = "application/octet-stream")]
public static const ResourcesData:Class;
public function OmegaPenguin(){
introMessage = introMessageRandomizer(new <String>["Even my own kind shuns me."]);
armatureName = "omegaPenguin";
factory.parseData(new ResourcesData());
armatureComplete = uniqueArmatureComplete;
}
public function uniqueAi():void{
if(GV.arena.summonIsDecoy){
if(slots[BLUE].startable) movementAI();
}else{
if(slots[BLUE].startable) evasionAI();
}
attackAI();
healAI();
}
public function uniqueRunAfterInit():void{
shadow.width = width*1.1
shadow.height -= 5;
}
private function uniqueArmatureComplete(e:AnimationEvent):void{
switch(afterAnim){
case 'idle':
idleAnimation();
break;
case 'effects':
executeEffects();
break;
case 'moveBack':
moveBackToOurTile();
moveBack = false;
break;
}
}
public function uniqueMovementAnimation():void{armature.animation.gotoAndPlay("running");}
public function uniqueIdleAnimation():void{armature.animation.gotoAndPlay("idle");}
public function awkwardAnimation():void{
castingAnimation();
setTimeout(executeEffects, 1000);
}
public function castingAnimation():void{
armature.animation.gotoAndPlay("casting");
}
//override protected function centerShadow():void{
// shadow.x = x;
// shadow.y = y + shadowHeight + 6;
//}
}
}