Esempio n. 1
0
        public void ShowGif(string filePath)
        {
            if (!System.IO.Path.IsPathRooted(filePath))
            {
                filePath = System.IO.Path.Combine(Application.dataPath, filePath);
            }

            GifDecoder decoder = new GifDecoder();

            m_Image = new GifImage();

            DecodeWorker worker = new DecodeWorker(m_WorkerPriority)
            {
                m_Decoder      = decoder,
                m_FilePath     = filePath,
                m_Image        = m_Image,
                OnDecodeFinish = OnDecodeFinish
            };

            m_State = State.Decoding;
            worker.Start();
        }
Esempio n. 2
0
 void OnDecodeFinish(GifImage image)
 {
     m_State = State.Decoded;
     m_Delay = image.timePerFrame / 100.0f;
 }