View Javadoc

1   package cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric;
2   
3   import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent;
4   import cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent;
5   import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
6   
7   /**
8    * Event raised each time some player has new emoticon set! Also emoticon resets
9    * (e.g. all emoticons set to NONE) will be notified.
10   * @author knight
11   */
12  public class NewEmoticonEvent implements IWorldEvent, IWorldChangeEvent{
13  
14      UnrealId playerId;
15  
16      Emoticon emoticon;
17  
18      long simTime;
19  
20      @Override
21      public long getSimTime() {
22          return simTime;
23      }
24  
25      /**
26       * Id of the player that owns the emoticon.
27       * @return
28       */
29      public UnrealId getPlayerId() {
30          return playerId;
31      }
32  
33      /**
34       * Actual new emoticon.
35       * @return
36       */
37      public Emoticon getEmoticon() {
38          return emoticon;
39      }
40  
41      /**
42       * Default constructor.
43       *
44       * @param playerId
45       * @param emoticon
46       * @param simTime
47       */
48      public NewEmoticonEvent(UnrealId playerId, Emoticon emoticon, long simTime) {
49          this.playerId = playerId;
50          this.emoticon = emoticon;
51          this.simTime = simTime;
52      }
53  
54  }