lib/metro/events/event_relay.rb
def notification(param,&block)
      custom_notifications[param.to_sym] = custom_notifications[param.to_sym] + [ block ]
    end
def notification(param,&block)
      custom_notifications[param.to_sym] = custom_notifications[param.to_sym] + [ block ]
    end
Register for a custom notification event. These events are fired when
 another object within the game posts a notification with matching criteria.
 If there has indeed been a match, then the stored action block will be fired.

 When the action block is specified is defined with no parameters it is assumed that
 that the code should be executed within the context of the object that defined
 the action, the 'target'.

 @example Registering for a save complete event that would re-enable a menu.

     class ExampleScene
       event :notification, :save_complete do
         menu.enabled!
       end
     end

 The action block can also be specified with two parameters. In this case the code is
 no longer executed within the context of the object and is instead provided the
 the action target and the action source.

 @example Registering for a win game event that explicitly states the target and source.

     class ExampleScene

       event :notification, :win_game do |target,winner|
         target.declare_winner winner
       end

       def declare_winner(winning_player)
         # ...
       end
     end