Level transition trigger
by Rich Wilson · in Torque X 2D · 09/16/2007 (11:50 am) · 2 replies
I'm about to implement a level transition trigger region, and I'm trying to think of the best way to do it. I have certain parameters that I want to be able to set on a per region basis in the editor, namely the destination level (and starting position in that level, but that will come online when I have a persistent data registry set up, etc. ).
So I was thinking about having a levelTransition component that I attach to the region that has both the string parameter of the scene to load and the onCollision delegate that the region will refer to when the player enters.
The only thing I'm trying to think of is how to get the delegate to know what the parameter is, since delegates are more of a singleton sort of thing, with no instance information. Or are they?
So I was thinking about having a levelTransition component that I attach to the region that has both the string parameter of the scene to load and the onCollision delegate that the region will refer to when the player enters.
The only thing I'm trying to think of is how to get the delegate to know what the parameter is, since delegates are more of a singleton sort of thing, with no instance information. Or are they?
About the author
#2
09/19/2007 (7:01 pm)
Yep, sounds good to me. In fact, that's how the triggers in the Platformer Kit work. :)
Torque Owner Rich Wilson