2012-11-15 14:20:13 +00:00
|
|
|
//Hatch Graphic
|
|
|
|
|
|
|
|
local hatch_anim;
|
|
|
|
local parent;
|
|
|
|
|
|
|
|
protected func Initialize()
|
|
|
|
{
|
|
|
|
SetProperty("MeshTransformation", Trans_Mul(Trans_Translate(0,-10000), Trans_Rotate(-10,0,1,0), Trans_Rotate(-8,1,0,0)));
|
|
|
|
}
|
|
|
|
|
|
|
|
public func SetHatchParent(object hatch)
|
|
|
|
{
|
|
|
|
parent = hatch;
|
|
|
|
}
|
|
|
|
|
|
|
|
func Anim(string anim_name)
|
|
|
|
{
|
|
|
|
var animstart = 0;
|
|
|
|
if(hatch_anim)
|
|
|
|
{
|
|
|
|
if(GetAnimationPosition(hatch_anim) != GetAnimationLength(anim_name))
|
|
|
|
{
|
|
|
|
animstart = GetAnimationLength(anim_name) - GetAnimationPosition(hatch_anim);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StopAnimation(hatch_anim);
|
2016-01-29 04:47:53 +00:00
|
|
|
hatch_anim = PlayAnimation(anim_name, 5, Anim_Linear(animstart, 0, GetAnimationLength(anim_name), 14, ANIM_Hold));
|
2012-11-15 14:20:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
local ActMap = {
|
|
|
|
Attach = {
|
|
|
|
Prototype = Action,
|
|
|
|
Name = "Attach",
|
|
|
|
Procedure = DFA_ATTACH,
|
|
|
|
Directions = 1,
|
|
|
|
X = 0,
|
|
|
|
Y = 0,
|
|
|
|
Wdt = 26,
|
|
|
|
Hgt = 26,
|
|
|
|
NextAction = "Attach",
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
local Plane = 100;
|