playMaker

Author Topic: Calling delegate events through FSM  (Read 3613 times)

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Calling delegate events through FSM
« 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.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Calling delegate events through FSM
« Reply #1 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

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

bye,

 Jean

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Re: Calling delegate events through FSM
« Reply #2 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.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Re: Calling delegate events through FSM
« Reply #3 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

Is Photon free licence enough to try the Playmaker integration?

Thanks in advance.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Calling delegate events through FSM
« Reply #4 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