Exemplo n.º 1
0
        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            int numTransistions = reader.ReadInt32();

            m_TransitionConstantArray = new TransitionConstant[numTransistions];
            for (int i = 0; i < numTransistions; i++)
            {
                m_TransitionConstantArray[i] = new TransitionConstant(stream);
            }

            int numBlendIndices = reader.ReadInt32();

            m_BlendTreeConstantIndexArray = new int[numBlendIndices];
            for (int i = 0; i < numBlendIndices; i++)
            {
                m_BlendTreeConstantIndexArray[i] = reader.ReadInt32();
            }

            int numInfos = reader.ReadInt32();

            m_LeafInfoArray = new LeafInfoConstant[numInfos];
            for (int i = 0; i < numInfos; i++)
            {
                m_LeafInfoArray[i] = new LeafInfoConstant(stream);
            }

            int numBlends = reader.ReadInt32();

            m_BlendTreeConstantArray = new BlendTreeConstant[numBlends];
            for (int i = 0; i < numBlends; i++)
            {
                m_BlendTreeConstantArray[i] = new BlendTreeConstant(stream);
            }

            m_NameID      = reader.ReadUInt32();
            m_PathID      = reader.ReadUInt32();
            m_TagID       = reader.ReadUInt32();
            m_Speed       = reader.ReadSingle();
            m_CycleOffset = reader.ReadSingle();
            m_IKOnFeet    = reader.ReadBoolean();
            m_Loop        = reader.ReadBoolean();
            m_Mirror      = reader.ReadBoolean();
            reader.ReadByte();
        }
Exemplo n.º 2
0
        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            int numTransistions = reader.ReadInt32();
            m_TransitionConstantArray = new TransitionConstant[numTransistions];
            for (int i = 0; i < numTransistions; i++)
            {
                m_TransitionConstantArray[i] = new TransitionConstant(stream);
            }

            int numBlendIndices = reader.ReadInt32();
            m_BlendTreeConstantIndexArray = new int[numBlendIndices];
            for (int i = 0; i < numBlendIndices; i++)
            {
                m_BlendTreeConstantIndexArray[i] = reader.ReadInt32();
            }

            int numInfos = reader.ReadInt32();
            m_LeafInfoArray = new LeafInfoConstant[numInfos];
            for (int i = 0; i < numInfos; i++)
            {
                m_LeafInfoArray[i] = new LeafInfoConstant(stream);
            }

            int numBlends = reader.ReadInt32();
            m_BlendTreeConstantArray = new BlendTreeConstant[numBlends];
            for (int i = 0; i < numBlends; i++)
            {
                m_BlendTreeConstantArray[i] = new BlendTreeConstant(stream);
            }

            m_NameID = reader.ReadUInt32();
            m_PathID = reader.ReadUInt32();
            m_TagID = reader.ReadUInt32();
            m_Speed = reader.ReadSingle();
            m_CycleOffset = reader.ReadSingle();
            m_IKOnFeet = reader.ReadBoolean();
            m_Loop = reader.ReadBoolean();
            m_Mirror = reader.ReadBoolean();
            reader.ReadByte();
        }
Exemplo n.º 3
0
        public void LoadFrom(Stream stream, uint version)
        {
            BinaryReader reader = new BinaryReader(stream);

            int numTransistions = reader.ReadInt32();

            m_TransitionConstantArray = new TransitionConstant[numTransistions];
            for (int i = 0; i < numTransistions; i++)
            {
                m_TransitionConstantArray[i] = new TransitionConstant(stream, version);
            }

            int numBlendIndices = reader.ReadInt32();

            m_BlendTreeConstantIndexArray = new int[numBlendIndices];
            for (int i = 0; i < numBlendIndices; i++)
            {
                m_BlendTreeConstantIndexArray[i] = reader.ReadInt32();
            }

            if (version < AssetCabinet.VERSION_5_0_0)
            {
                int numInfos = reader.ReadInt32();
                m_LeafInfoArray = new LeafInfoConstant[numInfos];
                for (int i = 0; i < numInfos; i++)
                {
                    m_LeafInfoArray[i] = new LeafInfoConstant(stream);
                }
            }

            int numBlends = reader.ReadInt32();

            m_BlendTreeConstantArray = new BlendTreeConstant[numBlends];
            for (int i = 0; i < numBlends; i++)
            {
                m_BlendTreeConstantArray[i] = new BlendTreeConstant(stream, version);
            }

            m_NameID = reader.ReadUInt32();
            m_PathID = reader.ReadUInt32();
            if (version >= AssetCabinet.VERSION_5_0_0)
            {
                m_FullPathID = reader.ReadUInt32();
            }
            m_TagID = reader.ReadUInt32();
            if (version >= AssetCabinet.VERSION_5_0_0)
            {
                m_SpeedParamID       = reader.ReadUInt32();
                m_MirrorParamID      = reader.ReadUInt32();
                m_CycleOffsetParamID = reader.ReadUInt32();
            }
            m_Speed       = reader.ReadSingle();
            m_CycleOffset = reader.ReadSingle();
            m_IKOnFeet    = reader.ReadBoolean();
            if (version >= AssetCabinet.VERSION_5_0_0)
            {
                m_WriteDefaultValues = reader.ReadBoolean();
            }
            m_Loop   = reader.ReadBoolean();
            m_Mirror = reader.ReadBoolean();
            if (version < AssetCabinet.VERSION_5_0_0)
            {
                stream.Position++;
            }
        }