Can you give more datails on what is the diference?Quote:
Originally Posted by VENGEANCE MX
I mean,to give each troop and bullet a reference to Stage(former _root) and using stageReference.myVar is faster then give the reference of myVar?
Printable View
Can you give more datails on what is the diference?Quote:
Originally Posted by VENGEANCE MX
I mean,to give each troop and bullet a reference to Stage(former _root) and using stageReference.myVar is faster then give the reference of myVar?
Well, instead of each time creating a troop, giving it a copy of a lot of the variables I've defined in the timeline (the collision quadrants array, the width and height of the quadrants, the troops array, etc), I now only pass it a _root property, so it doesn't need all those superfluous personal variable definitions - it can just use _root's ones. :)
By giving a copy you mean giving references, isnt it?And as for pass a _root property, you just give a reference to the root or you use a root class in the documentClass?(I would like to know wich of those two ways is faster, anyway)Quote:
Originally Posted by VENGEANCE MX
There is another thing to test, but i am afraid i am not good enough to do it(yet), wich is to see if dispatching events is faster than those other ways
It's a reference to _root I'm passing to the troops. Don't have a document class.
lol this is totally OT...but why does the right side always seem to win the war?
I only tried it four times but the right side always crushed the left
Thats what I said earlier. I've gone through it about 20 times already and not once did the left win, even when having an initial advantage, the right always seem to come back
I just thought it was funny because logic tells me the sides would spawn at about the same rate and all the actions are belonging to the clips so it would make sense if the sides ended up wining about an equal number of times
maybe its set for the left to be weaker.
Something has got to be off. Often times it looks like more spawn on the right side.