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

            SeekTo(curTime, false);
            FateFX.RegisterItem(this);
        }
예제 #2
0
파일: FateFX.cs 프로젝트: jerryrox/Renko-L
        /// <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();
        }
예제 #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();
        }
예제 #4
0
        /// <summary>
        /// Pauses the animation.
        /// </summary>
        public void Pause()
        {
            isPlaying = false;

            FateFX.RemoveItem(this);
        }