Esempio n. 1
0
        /// <summary>
        /// Plays the animation.
        /// </summary>
        public void Play()
        {
            isPlaying = true;

            SeekTo(curTime, false);
            FateFX.RegisterItem(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes FateFX module.
        /// </summary>
        public static void Initialize(int listCapacity = 0)
        {
            if (I != null)
            {
                return;
            }

            I         = RenkoLibrary.CreateModule <FateFX>();
            I.updater = new Updater(listCapacity);
            I.speed   = 1f;

            // Dependency
            Easing.Initialize();
        }
Esempio n. 3
0
        /// <summary>
        /// Stops the animation and resets time to 0.
        /// If update is true, this method will call SeekTo with time 0.
        /// Else, only the time is set to 0 and the view state will stay.
        /// </summary>
        public void Stop(bool update = false)
        {
            isPlaying = false;

            if (update)
            {
                SeekTo(0f, false);
            }
            else
            {
                curTime = 0f;
            }

            FateFX.RemoveItem(this);
            InvokeResetter();
        }
Esempio n. 4
0
        /// <summary>
        /// Pauses the animation.
        /// </summary>
        public void Pause()
        {
            isPlaying = false;

            FateFX.RemoveItem(this);
        }