"Pairing" events and methods.

pabloisuarez's Avatar

pabloisuarez

19 Mar, 2012 08:34 PM

Hi guys, Im new here.

I consulted with a coworker about something I want to implement in my project, and he told me about robotlegs, it would be like this:

from a external data source (databse, xml, etc) I create objects that behave the way need and more important, when I need, let me explain:

I got a unit, let say, a soldier, that listens to the event: "walk" and executes the method: "walkNormally".

Obviously, I got a lot more of pairs of events - methods that I need in order to get my soldier performing like a soldier, like shoot, run, die, etc.

Is robotlegs capable of making this task?.

Thanks in advance.

  1. 1 Posted by wagster on 19 Mar, 2012 09:08 PM

    wagster's Avatar

    It sounds like you're describing standard OO stuff - event listeners listen for events and execute methods.

    You can to do this with or without Robotlegs. If you use RL you will have to invest time learning it. If your project is complex you should make that time back pretty quickly as you can structure it better and it will be easier to build.

  2. Ondina D.F. closed this discussion on 24 Apr, 2012 12:49 PM.

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

Keyboard shortcuts

Generic

? 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