calling functions from different classes question (edit)
by rennie moffat · in iTorque 2D · 06/03/2011 (1:02 pm) · 0 replies
edit:::
Just a guess, here I am away on another issue, regarding build, but to save headaches and teasing, I suppose I answered it already?
If in classF function thisY call %this.set3()
and as long as in classW (where I have %this.set3()) it should work right???
anyhow, I think that is it.
:::)((!
Hi there,
On behalf of some messy coding on my part, example, mouseEvents true on some object, when click do this, however, by accident, the wrong behaviorClass was set and thus being called. That accident has raised a question. Can I, from one behavior call a function in another. I realize there is getBehavior(), but as far as I know (and I could be wrong) is only used to get info, variables etc. I will give you an example of what I am trying to achieve.
function class321Behavior::doThisFirst(%this)
{
if($123 == true)
{
///and here is where I want to call class123Behavior function doThisSecond
}
}
so in essacne, class123Behavior is a completely differnt behavior than class321Behavior, obviously, and I want to trigger a specific function in it from the other.
is there a way I can do that?
Just a guess, here I am away on another issue, regarding build, but to save headaches and teasing, I suppose I answered it already?
If in classF function thisY call %this.set3()
and as long as in classW (where I have %this.set3()) it should work right???
anyhow, I think that is it.
:::)((!
Hi there,
On behalf of some messy coding on my part, example, mouseEvents true on some object, when click do this, however, by accident, the wrong behaviorClass was set and thus being called. That accident has raised a question. Can I, from one behavior call a function in another. I realize there is getBehavior(), but as far as I know (and I could be wrong) is only used to get info, variables etc. I will give you an example of what I am trying to achieve.
function class321Behavior::doThisFirst(%this)
{
if($123 == true)
{
///and here is where I want to call class123Behavior function doThisSecond
}
}
so in essacne, class123Behavior is a completely differnt behavior than class321Behavior, obviously, and I want to trigger a specific function in it from the other.
is there a way I can do that?
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.