A couple iTGB questions...
by Daniel Hopkins · in iTorque 2D · 01/10/2010 (6:37 pm) · 4 replies
Hey,
I have two questions regarding the workins of iTGB 1.3.
First of all, iTGB 1.3 will now automatically load the necessary datablocks for a level via executing the "levelname_datablocks.cs" file. However, does it automatically clear those datablocks when loading a new level? Or do I have to do something like:
Second, is there a way to use the "oniPhoneTouch[down/up]" functions on a per-object basis. In other words, is it possible to set up a class or behavior to handle those callbacks on objects they are assigned too, or do I have to use the global callbacks, cycle through all the touch points, and figure out which objects were touched manually?
I have two questions regarding the workins of iTGB 1.3.
First of all, iTGB 1.3 will now automatically load the necessary datablocks for a level via executing the "levelname_datablocks.cs" file. However, does it automatically clear those datablocks when loading a new level? Or do I have to do something like:
$levelDatablocks.delete(); //call this before loading a new level to clear current level datablocks loadlevel( [level] );
Second, is there a way to use the "oniPhoneTouch[down/up]" functions on a per-object basis. In other words, is it possible to set up a class or behavior to handle those callbacks on objects they are assigned too, or do I have to use the global callbacks, cycle through all the touch points, and figure out which objects were touched manually?
#2
01/12/2010 (2:07 pm)
removed again
#3
@Marc: Actually, I am using T2Di 1.3 and mouse events are being registered on my device. That's what I'm currently using to handle buttons.
So now I'm just wondering about the level datablocks. Do I call delete before loading a new level, or is that done automatically?
Thanks again!
01/12/2010 (3:11 pm)
Thanks for the comments! After looking through my code again, the problem I was having is I also had an "onMouseLeave" callback which set my button to the "up" state. So, when I would tap another button with another finger, it would call that function on the first button. The short of it is, it works!@Marc: Actually, I am using T2Di 1.3 and mouse events are being registered on my device. That's what I'm currently using to handle buttons.
So now I'm just wondering about the level datablocks. Do I call delete before loading a new level, or is that done automatically?
Thanks again!
#4
01/12/2010 (3:49 pm)
will have to double check my stuff then.
Associate Dave Calabrese
Cerulean Games