Пример #1
0
        /// <summary>
        /// Creates a new Animatic.
        /// </summary>
        /// <param name="filepath">The filepath of the Animatic.</param>
        public Animatic(string filepath)
        {
            AnimaticInfo info = XmlHelper.Deserialize <AnimaticInfo>(filepath, ".Animatic", true);

            activeState = info.ActiveInState;

            for (int i = 0; i < info.Streams.Length; i++)
            {
                AnimaticStream stream = new AnimaticStream(info.Streams[i], i);
                stream.OnEnd += new EndOfStreamEvent(OnEnd);

                streams.Add(stream);
            }

            AnimaticManager am = (AnimaticManager)EngineComponentManager.Find("AnimaticManager");

            if (am != null)
            {
                am.Add(this);
            }
        }
Пример #2
0
        /// <summary>
        /// Creates a new Animatic.
        /// </summary>
        /// <param name="filepath">The filepath of the Animatic.</param>
        public Animatic(string filepath)
        {
            AnimaticInfo info =
                Common.ContentManager.Load <AnimaticInfo>(filepath);

            activeState = info.ActiveInState;

            for (int i = 0; i < info.Streams.Count; i++)
            {
                AnimaticStream stream = new AnimaticStream(info.Streams[i], i);
                stream.OnEnd += new EndOfStreamEvent(OnEnd);

                streams.Add(stream);
            }

            AnimaticManager am = (AnimaticManager)EngineComponentManager.Find("AnimaticManager");

            if (am != null)
            {
                am.Add(this);
            }
        }