Esempio n. 1
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            DefaultAnimation.Read(reader);
            if (IsReadAnimationsPaired(reader.Version))
            {
                m_animationsPaired = reader.ReadTupleStringTArray <PPtr <AnimationClip> >();
            }
            else
            {
                m_animations = reader.ReadArray <PPtr <AnimationClip> >();
            }
            WrapMode          = (WrapMode)reader.ReadInt32();
            PlayAutomatically = reader.ReadBoolean();
            AnimatePhysics    = reader.ReadBoolean();
            if (IsReadAnimateOnlyIfVisible(reader.Version))
            {
                AnimateOnlyIfVisible = reader.ReadBoolean();
            }
            if (IsAlign(reader.Version))
            {
                reader.AlignStream(AlignType.Align4);
            }

            if (IsReadCullingType(reader.Version))
            {
                CullingType = (AnimationCullingType)reader.ReadInt32();
            }

            if (IsReadUserAABB(reader.Version))
            {
                UserAABB.Read(reader);
            }
        }
Esempio n. 2
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            AnimationLayout layout = reader.Layout.Animation;

            DefaultAnimation.Read(reader);
            if (layout.HasAnimations)
            {
                Animations = reader.ReadAssetArray <PPtr <AnimationClip> >();
            }
            else
            {
                AnimationsPaired = reader.ReadTupleStringTArray <PPtr <AnimationClip> >();
            }

            WrapMode          = (WrapMode)reader.ReadInt32();
            PlayAutomatically = reader.ReadBoolean();
            AnimatePhysics    = reader.ReadBoolean();
            if (layout.HasAnimateOnlyIfVisible)
            {
                AnimateOnlyIfVisible = reader.ReadBoolean();
            }
            if (layout.IsAlign)
            {
                reader.AlignStream();
            }

            if (layout.HasCullingType)
            {
                CullingType = (AnimationCullingType)reader.ReadInt32();
            }
            if (layout.HasUserAABB)
            {
                UserAABB.Read(reader);
            }
        }