Esempio n. 1
0
        public bool IsTimeOver()
        {
            if (timer.GetElapsedTimeInSeconds() >= current_interval)
            {
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        private void Update()
        {
            float elapsed_time = animation_timer.GetElapsedTimeInSeconds();

            this.FetchComponent <SpriteRenderer>().sprite = burst_sprite.GetFrameByTime(elapsed_time);

            if (elapsed_time >= burst_sprite.GetDuration())
            {
                this.DestroyGameObject();
            }
        }
Esempio n. 3
0
 private void Update()
 {
     if (Application.isPlaying)
     {
         GetComponent <SpriteRenderer>().sprite = current_animation
                                                  .GetFrameByTime(
             animation_time.GetElapsedTimeInSeconds() +
             use_random_offset.ConvertBool(random_offset)
             );
     }
     else
     {
         GetComponent <SpriteRenderer>().sprite = animated_sprite.GetDefaultFrame();
     }
 }