Actionscript 3

Javascript code posted by Chris
created at 02 Nov 07:07

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    override public function listNotificationInterests():Array
    {
      return [
        GameRoomInterest.SHOW_DASHBOARD
        ,
        GameRoomInterest.HIDE_DASHBOARD
        ,
        GameRoomInterest.JOIN_GAME
        ,
        GameInterest.NOTIFIY_USER
        ,
        GameInterest.USER_ACTION_PROMPT
        ,
        GameInterest.GAME_IS_CLOSED
        ,
        GameInterest.GAME_ROUND_ENDED
        ];
    }
    
    override public function handleNotification(notification:INotification):void
    {
      DEBUG::log {
        log.debug(ObjectUtil.toString(notification.getBody()));
      }
      trace("gameRoomNotification: "+notification.getName()+"->"+ObjectUtil.toString(notification.getBody()));
      switch(notification.getName())
      {
        case GameRoomInterest.JOIN_GAME:
          gameRoomInfo = GameRoomInfo(notification.getBody());
          loadGame(gameRoomInfo);
          break;
838 Bytes in 2 ms with coderay