/
HandToStackAnimation.as
69 lines (43 loc) · 1.2 KB
/
HandToStackAnimation.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
{
import flash.display.MovieClip;
//-----------------------
//Purpose:
//Properties:
//
//Methods:
//
//-----------------------
public class HandToStackAnimation extends MultiCardMoveAnimation
{
// Constants //
//- Constants -//
// Public Properties //
//- Public Properties -//
// Private Properties //
private var _stackIndex:int;
//- Private Properties -//
// Initialization //
public function HandToStackAnimation(gameController:GameController, canvas:MovieClip, sourceLocations:Array, destinations:Array, cards:Array, stackIndex:int, speed:int)
{
super(gameController, canvas, sourceLocations, destinations, cards, speed, true);
_stackIndex = stackIndex;
}
//- Initialization -//
// Public Methods //
protected override function AnimationComplete():void
{
var iNumChildren:int = _canvas.numChildren;
for (var i:int = 0; i < iNumChildren; i++)
{
_canvas.removeChildAt(0);
}
_gameController.ResolveHandToStack(_cards, _stackIndex);
}
//- Public Methods -//
// Private Methods //
//- Private Methods -//
// Testing Methods //
//- Testing Methods -//
}
}