Removing multiple objects using event dispatchers

uduh3's Avatar


02 Aug, 2010 08:53 AM

Hi guys

What is the process of using the event dispatcher and Command Map that stores a reference (for example a ball) that is requesting removal - and then be able to inject that event into the command and pull out the reference to the appropriate ball. I am trying to create a multiplayer game using robot legs that has game logic

any suggestions


  1. 1 Posted by uduh3 on 02 Aug, 2010 09:13 AM

    uduh3's Avatar

    Ive attached the file for viewing

  2. Support Staff 2 Posted by Shaun Smith on 02 Aug, 2010 01:41 PM

    Shaun Smith's Avatar

    What you need to do is create a custom Event that stores the reference to the ball. Bind that event to your DeleteBallCommand, and inject the event into that command. I have modified your example to show the approach (almost every file has been edited, so please look through them all).

  3. 3 Posted by uduh3 on 02 Aug, 2010 03:06 PM

    uduh3's Avatar

    Thanks for the help, spot on!

  4. Support Staff 4 Posted by Shaun Smith on 02 Aug, 2010 03:31 PM

    Shaun Smith's Avatar

    My pleasure :)

  5. Shaun Smith closed this discussion on 02 Aug, 2010 03:31 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac