コード例 #1
0
ファイル: AnimationSystem.cs プロジェクト: ronbrogan/OpenH2
        internal void StartAnimation(IUnit unit, AnimationGraphTag.Animation animation, bool interpolate, bool loop)
        {
            var frameData = JmadDataProcessor.GetProcessor().GetAnimation(animation.FrameCount, animation.BoneCount, animation.Data);

            // Find PostComponent for unit?

            // Set animation on the PoseComponent

            throw new NotImplementedException();
        }
コード例 #2
0
        public void ProcessAnimation3()
        {
            Span <byte> animationData = File.ReadAllBytes(@"D:\h2scratch\03_intro.camera.0.anim");

            var processor = JmadDataProcessor.GetProcessor();

            var animation = processor.GetAnimation(703, bones: 1, animationData);

            Assert.Equal(703, animation.Frames.GetLength(0));
        }
コード例 #3
0
        public void ProcessAnimation4()
        {
            Span <byte> animationData = File.ReadAllBytes(@"D:\h2scratch\animations\marine_tutorial.jmad.l01_0010_jon.anim");

            var processor = JmadDataProcessor.GetProcessor();

            var animation = processor.GetAnimation(110, bones: 53, animationData);

            Assert.Equal(110, animation.Frames.GetLength(0));
        }
コード例 #4
0
        public void ProcessAnimation2()
        {
            Span <byte> animationData = File.ReadAllBytes(@"D:\h2scratch\fp_battle_rifle.first_person.fire_1.var1.anim");

            var processor = JmadDataProcessor.GetProcessor();

            var animation = processor.GetAnimation(8, bones: 42, animationData);

            Assert.Equal(8, animation.Frames.GetLength(0));
        }