Hello Guest

Author Topic: Clip Time  (Read 3645 times)

hromoydron

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 28
    • View Profile
Clip Time
« on: June 26, 2013, 06:37:29 pm »
Hello!
How I can see time of the current clip in Animated Sprite?
anim.ClipTimeSeconds gives me current playing time, but I need all time.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Clip Time
« Reply #1 on: June 26, 2013, 08:10:02 pm »
Is it the clip length in seconds?
Remember the clip length only exists for non-looped clips.

float totalClipLength = anim.CurrentClip.frames.Length / anim.CurrentClip.fps;

hromoydron

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Clip Time
« Reply #2 on: June 26, 2013, 08:48:36 pm »
yes. thank you!