I've noticed that at the start of my game theres a drop in frame rate for a second, and i think it's to do with all the world objects going to sleep.
So how can i set them all to sleep immediately? Think i remember Mayo saying he's done this before but he didn't say how... it's probably really simple though?
How can that be applied to everything inside a world? Instead of setting it for every object individually.
You can use it inside the BodyShape class or in the class that extends BodyShape.
Or you can set a loop through all the children of the world, check if they are objects, and set the property awake false.
I'm using the Boxman.as class thats included with the demo, how can i use SetAwake = false; with that? I've tried doing it and i dont get any compile errors but it dont seem to be working.
Could you give an example code of what i would need to do in order to put all objects to sleep inside the world? i'd really appreciate it!
Hi Friend i am kewal kumar newly just few day join.
A few days ago I'm started my new project seo forums.i am fresher in this site.Pls give me some information.The right place for Forums marketing and one-way quality links building. forums submiting is absolutely free, but we will approve only high-quality and absolutely unique content, which is licensed under a Creative Commons.
Oh great now these forums have spam^
Can anyone help me though? 🙁
There are two properties involved with sleeping that you'll want to set:
autoSleep = true
awake = false
In order to set them on all objects of your world at once, select everything in your world in flash, then run the "Set Component Property.jsfl" script in the scripts folder. You can probably just double click it (while everything is still selected in Flash). It'll ask you what property you want to set and the value you want to set it to. So just enter "awake" then "false". This should set everything to initially be sleeping.