zippy
New Member
Posts: 3
Posts: 3
|
Post by zippy on Mar 21, 2016 18:59:40 GMT
I am making a game where time can slow down and speed up at different rates for selected gameObjects. I need to make it so spawning time and wave duration can stretch and shrink in realtime. I am trying to modify CoreGameKit to allow this.
I tried using LevelSettings.PauseWave and LevelSettings.UnpauseWave every n number of frames but that doesn't appear to work for lengths less than one second. I am a pretty savvy C# developer. Can you give me some tips or suggestions on how I might modify CGK to allow this?
On my own scripts , and for Unity Bullet Hell asset, I use my own modified DeltaTime on update and it works great. But had less luck using this approach with CGK.
Thanks in advance for any help or guidance!
|
|
|
Post by DarkTonic Dev on Mar 21, 2016 19:32:28 GMT
Could you instead try changing the Time.timeScale value and maybe the spawner will slow down on its own?
Looking at the code in LevelSettings, it looks like it should allow the wave to unpause every 0.1 seconds, not every 1 second. That's how often the CoUpdate code runs and checks for unpause.
|
|
zippy
New Member
Posts: 3
Posts: 3
|
Post by zippy on Mar 21, 2016 19:51:51 GMT
I can't use Time.timeScale as I need to apply the slow effect selectively, but the CoUpdate code in LevelSettings gives me a good place to to try and apply my effect. I will let you know how it goes. Thanks!
|
|
zippy
New Member
Posts: 3
Posts: 3
|
Post by zippy on Mar 21, 2016 20:52:18 GMT
Adjusting Time.timeScale worked great actually. I then just use custom timeDelta for objects UNaffected by timescale. Thanks again for your quick and helpful reply!
|
|
|
Post by DarkTonic Dev on Mar 21, 2016 21:07:38 GMT
Glad to hear!
|
|