Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: DARK_ETERNAL on October 22, 2012, 04:37:18 PM

Title: Calling delegate events through FSM
Post by: DARK_ETERNAL on October 22, 2012, 04:37:18 PM
Greetings.

I've read some of the earlier posts trying to figure out how to call delegate events from an FSM. I can think of calling a function that calls the delegate event, but it'd be using the Send Message or Invoke Method actions. It'd work the same for subscribing/unsubscribing delegates.

Any better ideas? Is this efficient enough? Any issue I'm not considering?

Thanks in advance.
Title: Re: Calling delegate events through FSM
Post by: jeanfabre on October 23, 2012, 03:37:47 AM
hi,

 delegates unfortunatly will require custom actions for each framework or feature you want to tight in playmaker.

It's actually very easy, that's the good thing tho. There is plenty of examples in the wiki on delegates implementation between several frameworks and Playmaker.

 have a look at the photon integration, it's very rich and quite extensive in that area:
http://hutonggames.com/playmakerforum/index.php?topic=1390.0 (http://hutonggames.com/playmakerforum/index.php?topic=1390.0)

also have a look at the input.touches and targetPro for example:
https://hutonggames.fogbugz.com/default.asp?W714 (https://hutonggames.fogbugz.com/default.asp?W714)

bye,

 Jean
Title: Re: Calling delegate events through FSM
Post by: DARK_ETERNAL on October 24, 2012, 10:51:00 AM
Thanks for the reply.

I actually tried the solution that behaves as I described before, and it works, although it might be not the best approach for specific scenarios. Gotta try your suggestions, jeanfabre.
Title: Re: Calling delegate events through FSM
Post by: DARK_ETERNAL on October 24, 2012, 10:54:33 AM
have a look at the photon integration, it's very rich and quite extensive in that area:
http://hutonggames.com/playmakerforum/index.php?topic=1390.0 (http://hutonggames.com/playmakerforum/index.php?topic=1390.0)

Is Photon free licence enough to try the Playmaker integration?

Thanks in advance.
Title: Re: Calling delegate events through FSM
Post by: jeanfabre on October 26, 2012, 01:48:19 AM
Hi,

 yes, Photon free license is what you need to start with and actually will take you a long way indeed!

bye,

 Jean