public AnimatorBase(WalkSpeedSupplierDelegate WalkSpeedSupplier, Animation[] Animations, Action <string> onAnimationStoppedListener = null) { this.WalkSpeedSupplier = WalkSpeedSupplier; this.onAnimationStoppedListener = onAnimationStoppedListener; anims = new RunningAnimation[Animations == null ? 0 : Animations.Length]; for (int i = 0; i < anims.Length; i++) { Animations[i].Code = Animations[i].Code.ToLower(); anims[i] = new RunningAnimation() { Active = false, Running = false, Animation = Animations[i], CurrentFrame = 0 }; } float[] identMat = Mat4f.Create(); for (int i = 0; i < TransformationMatricesDefaultPose.Length; i++) { TransformationMatricesDefaultPose[i] = identMat[i % 16]; } }
public ClientAnimator(WalkSpeedSupplierDelegate walkSpeedSupplier, List <ElementPose> rootPoses, Animation[] animations, ShapeElement[] rootElements, Dictionary <int, AnimationJoint> jointsById, Action <string> onAnimationStoppedListener = null) : base(walkSpeedSupplier, animations, onAnimationStoppedListener) { this.rootElements = rootElements; this.jointsById = jointsById; this.RootPoses = rootPoses; LoadAttachmentPoints(RootPoses); }
public ServerAnimator(WalkSpeedSupplierDelegate walkSpeedSupplier, Animation[] animations, ShapeElement[] rootElements, Dictionary <int, AnimationJoint> jointsById, Action <string> onAnimationStoppedListener = null, bool loadFully = false) : base(walkSpeedSupplier, animations, onAnimationStoppedListener) { this.rootElements = rootElements; this.jointsById = jointsById; this.loadFully = loadFully; RootPoses = new List <ElementPose>(); LoadPosesAndAttachmentPoints(rootElements, RootPoses); }
public ClientAnimator(WalkSpeedSupplierDelegate walkSpeedSupplier, Animation[] animations, Action <string> onAnimationStoppedListener = null) : base(walkSpeedSupplier, animations, onAnimationStoppedListener) { initFields(); }