public void execute_hooks(AnimationFrame animFrame, AnimationHookDir dir) { if (animFrame == null || HookObj == null) { return; } foreach (var hook in animFrame.Hooks) { if (hook.Direction == AnimationHookDir.Both || hook.Direction == dir) { HookObj.add_anim_hook(new AnimHook(hook)); } } }
public AnimHook(AnimationHook animHook) { HookType = (PhysicsHookType)animHook.HookType; Direction = animHook.Direction; }
/// <summary> /// WARNING: If you're reading a hook from the dat, you should use AnimationHook.ReadHook(reader). /// If you read a hook from the dat using this function, it is likely you will not read all the data correctly. /// </summary> public virtual void Unpack(BinaryReader reader) { HookType = (AnimationHookType)reader.ReadUInt32(); Direction = (AnimationHookDir)reader.ReadInt32(); }