Jump to content

How do I tell an object to do something for X seconds?


sodacrunch
 Share

Recommended Posts

http://jsfiddle.net/sodacrunch/73c9W/1/

 

I wanted to know what the term/subject is called for telling an object to do something for X amount of seconds. For example, go left for one second and then down for 2 seconds and then right for 4 seconds, etc etc. Is it "delta time" ? Also, is my current setup correct or should I change it? I was using set interval before but switched to requestanimationframe. 

Link to comment
Share on other sites

http://jsfiddle.net/sodacrunch/73c9W/1/

 

I wanted to know what the term/subject is called for telling an object to do something for X amount of seconds. For example, go left for one second and then down for 2 seconds and then right for 4 seconds, etc etc. Is it "delta time" ? Also, is my current setup correct or should I change it? I was using set interval before but switched to requestanimationframe. 

I guess it's called the behavior.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...