Creating a clock exactly like the global one

edited February 2012 in Help request
If I wanted to pretty much clone the global orx clock, how would I go about doing it?

Also, if I paused the global clock, what would be paused? Physics updates? Animation updates? Input updates?

Comments

  • edited February 2012
    So if you pause the core clock, yes everything is paused, including polling system events. So it's probably not something you'd want to do. :)

    Why do you need to clone the core clock? I mean, what are you trying to achieve? :)
  • edited February 2012
    In my code, I read a custom section from config that creates timers. When these timers fire off, a function is called that creates the objects that contain the spawners that spawn the enemies. This is how we control the waves of enemies. Currently, it uses AddGlobalTimer. If I can create a clock exactly like the global clock, I don't have to change my function.
  • edited February 2012
    Ah sure, but that's the "exactly like the global one" part I don't understand.
    Anyway, you can create clocks by using orxClock_CreateFromConfig() and use orxClock_AddTimer().
  • edited February 2012
    I mean that there are 4 types of clocks... at least, that's what the documentation says.
    Maybe a better way to ask this question would be, What's the difference between the 4 different types of clocks? Core, User, Second or Number? If I create from config, which one does it select?
  • edited February 2012
    Those are juste categories. When you create a clock from config it'll always be user.
    - core is for the internal core clock
    - second is for an internal clock that ticks every second
    - number isn't a category, it tells you how many valid entries there's in this enum, all the enum have a _NUMBER and a _NONE. :)
  • edited February 2012
    Oh. Well thanks! I'll be sure to get this working sometime soon...
Sign In or Register to comment.