1 package cz.cuni.amis.pogamut.ut2004.analyzer;
2
3 import java.io.File;
4 import java.io.PrintWriter;
5
6 import com.google.inject.Inject;
7
8 import cz.cuni.amis.pogamut.base.communication.command.IAct;
9 import cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEventListener;
10 import cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectEventListener;
11 import cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent;
12 import cz.cuni.amis.pogamut.base.component.bus.IComponentBus;
13 import cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger;
14 import cz.cuni.amis.pogamut.base.utils.math.DistanceUtils;
15 import cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId;
16 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.ConfigurationObserver;
17 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.InitializeObserver;
18 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AddInventoryMsg;
19 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.AdrenalineGained;
20 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled;
21 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Bumped;
22 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ChangedWeapon;
23 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ComboStarted;
24 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FallEdge;
25 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo;
26 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameRestarted;
27 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GlobalChat;
28 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.HearNoise;
29 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.HearPickup;
30 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.IncomingProjectile;
31 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemPickedUp;
32 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.JumpPerformed;
33 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Landed;
34 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.LostChild;
35 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory;
36 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player;
37 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerDamaged;
38 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerJoinsGame;
39 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerKilled;
40 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerLeft;
41 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerScore;
42 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.RecordingEnded;
43 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.RecordingStarted;
44 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Self;
45 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ShootingStarted;
46 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ShootingStopped;
47 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Spawn;
48 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Thrown;
49 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.WallCollision;
50 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.WeaponUpdate;
51 import cz.cuni.amis.pogamut.ut2004.communication.worldview.UT2004WorldView;
52 import cz.cuni.amis.pogamut.ut2004.observer.impl.UT2004Observer;
53 import cz.cuni.amis.utils.exception.PogamutException;
54
55
56
57
58
59
60 public class UT2004AnalyzerFullObserver extends UT2004Observer implements IUT2004AnalyzerObserver {
61
62 private UnrealId observedBotId;
63
64 private IWorldEventListener<GameRestarted> gameRestartedListener = new IWorldEventListener<GameRestarted>() {
65
66 @Override
67 public void notify(GameRestarted event) {
68 if (event.isStarted()) {
69 gameRestartStarted();
70 } else
71 if (event.isFinished()) {
72 gameRestartEnd();
73 } else {
74 throw new PogamutException("GameRestarted has started==false && finished==false as well, invalid!", this);
75 }
76 }
77
78 };
79
80 @Inject
81 public UT2004AnalyzerFullObserver(UT2004AnalyzerFullObserverParameters params,
82 IComponentBus bus, IAgentLogger agentLogger,
83 UT2004WorldView worldView, IAct act) {
84 super(params, bus, agentLogger, worldView, act);
85 observedBotId = UnrealId.get(params.getObservedAgentId());
86 getWorldView().addEventListener(GameRestarted.class, gameRestartedListener);
87 if (params.isHumanLikeObservingEnabled()) {
88 initializeHumanLikeObserving(params.getHumanLikeBotName(), params.getHumanLikeWriter());
89 }
90 }
91
92 @Override
93 public UT2004AnalyzerFullObserverParameters getParams() {
94 return (UT2004AnalyzerFullObserverParameters) super.getParams();
95 }
96
97 @Override
98 public UnrealId getObservedBotId() {
99 return observedBotId;
100 }
101
102
103
104
105
106 public String getOutputFilePath() {
107 String path = getParams().getOutputPath();
108 if (path == null) path = ".";
109 path += File.separator;
110 if (getParams().getFileName() != null) {
111 path += getParams().getFileName();
112 } else {
113 path += getObservedBotId().getStringId();
114 path += ".csv";
115 }
116 return path;
117 }
118
119
120
121
122
123
124
125
126
127 protected void gameRestartStarted() {
128 }
129
130
131
132
133
134
135
136
137
138 protected void gameRestartEnd() {
139 }
140
141
142
143
144
145 @Override
146 protected void startAgent() {
147 super.startAgent();
148 getAct().act(new InitializeObserver().setId(getParams().getObservedAgentId()));
149 configureObserver();
150 }
151
152 @Override
153 protected void startPausedAgent() {
154 super.startPausedAgent();
155 getAct().act(new InitializeObserver().setId(getParams().getObservedAgentId()));
156 configureObserver();
157 }
158
159
160
161
162
163
164
165 protected void configureObserver() {
166 if (getParams().isHumanLikeObservingEnabled()) {
167 getAct().act(new ConfigurationObserver().setUpdate(0.2).setAll(true).setSelf(true).setAsync(true).setGame(true).setSee(false).setSpecial(false));
168 } else {
169 getAct().act(new ConfigurationObserver().setUpdate(0.2).setAll(true).setSelf(true).setAsync(true).setGame(false).setSee(false).setSpecial(false));
170 }
171 }
172
173
174
175
176
177
178
179
180 private Player humanLike_enemy = null;
181
182
183
184 private String humanLike_playerName;
185
186
187
188 private PrintWriter humanLike_writer;
189
190
191
192
193 public static final String humanLike_DELIMITER = "$";
194
195
196
197
198 IWorldEventListener<AddInventoryMsg> humanLike_addInventoryMsgListener = new IWorldEventListener<AddInventoryMsg>() {
199 @Override
200 public void notify(AddInventoryMsg event) {
201 processAddInventoryMsgEvent(event);
202 }
203 };
204
205
206
207 IWorldEventListener<AdrenalineGained> humanLike_adrenalineGainedListener = new IWorldEventListener<AdrenalineGained>() {
208 @Override
209 public void notify(AdrenalineGained event) {
210 processAdrenalineGainedEvent(event);
211 }
212 };
213
214
215
216 IWorldEventListener<Bumped> humanLike_bumpedListener = new IWorldEventListener<Bumped>() {
217 @Override
218 public void notify(Bumped event) {
219 processBumpedEvent(event);
220 }
221 };
222
223
224
225 IWorldEventListener<ChangedWeapon> humanLike_changedWeaponListener = new IWorldEventListener<ChangedWeapon>() {
226 @Override
227 public void notify(ChangedWeapon event) {
228 processChangedWeaponEvent(event);
229 }
230 };
231
232
233
234 IWorldEventListener<ComboStarted> humanLike_comboStartedListener = new IWorldEventListener<ComboStarted>() {
235 @Override
236 public void notify(ComboStarted event) {
237 processComboStartedEvent(event);
238 }
239 };
240
241
242
243 IWorldEventListener<FallEdge> humanLike_fallEdgeListener = new IWorldEventListener<FallEdge>() {
244 @Override
245 public void notify(FallEdge event) {
246 processFallEdgeEvent(event);
247 }
248 };
249
250
251
252 IWorldEventListener<GameInfo> humanLike_gameInfoListener = new IWorldEventListener<GameInfo>() {
253 @Override
254 public void notify(GameInfo event) {
255 processGameInfoEvent(event);
256 }
257 };
258
259
260
261 IWorldEventListener<GlobalChat> humanLike_globalChatListener = new IWorldEventListener<GlobalChat>() {
262 @Override
263 public void notify(GlobalChat event) {
264 processGlobalChatEvent(event);
265 }
266 };
267
268
269
270 IWorldEventListener<HearNoise> humanLike_hearNoiseListener = new IWorldEventListener<HearNoise>() {
271 @Override
272 public void notify(HearNoise event) {
273 processHearNoiseEvent(event);
274 }
275 };
276
277
278
279 IWorldEventListener<HearPickup> humanLike_hearPickupListener = new IWorldEventListener<HearPickup>() {
280 @Override
281 public void notify(HearPickup event) {
282 processHearPickupEvent(event);
283 }
284 };
285
286
287
288 IWorldEventListener<IncomingProjectile> humanLike_incomingProjectileListener = new IWorldEventListener<IncomingProjectile>() {
289 @Override
290 public void notify(IncomingProjectile event) {
291 processIncomingProjectileEvent(event);
292 }
293 };
294
295
296
297 IWorldEventListener<ItemPickedUp> humanLike_itemPickedUpListener = new IWorldEventListener<ItemPickedUp>() {
298 @Override
299 public void notify(ItemPickedUp event) {
300 processItemPickedUpEvent(event);
301 }
302 };
303
304
305
306 IWorldEventListener<JumpPerformed> humanLike_jumpPerformedListener = new IWorldEventListener<JumpPerformed>() {
307 @Override
308 public void notify(JumpPerformed event) {
309 processJumpPerformedEvent(event);
310 }
311 };
312
313
314
315 IWorldEventListener<Landed> humanLike_landedListener = new IWorldEventListener<Landed>() {
316 @Override
317 public void notify(Landed event) {
318 processLandedEvent(event);
319 }
320 };
321
322
323
324 IWorldEventListener<LostChild> humanLike_lostChildListener = new IWorldEventListener<LostChild>() {
325 @Override
326 public void notify(LostChild event) {
327 processLostChildEvent(event);
328 }
329 };
330
331
332
333 IWorldEventListener<PlayerDamaged> humanLike_playerDamagedListener = new IWorldEventListener<PlayerDamaged>() {
334 @Override
335 public void notify(PlayerDamaged event) {
336 processPlayerDamagedEvent(event);
337 }
338 };
339
340
341
342 IWorldEventListener<PlayerJoinsGame> humanLike_playerJoinsGameListener = new IWorldEventListener<PlayerJoinsGame>() {
343 @Override
344 public void notify(PlayerJoinsGame event) {
345 processPlayerJoinsGameEvent(event);
346 }
347 };
348
349
350
351 IWorldEventListener<PlayerKilled> humanLike_playerKilledListener = new IWorldEventListener<PlayerKilled>() {
352 @Override
353 public void notify(PlayerKilled event) {
354 processPlayerKilledEvent(event);
355 }
356 };
357
358
359
360 IWorldEventListener<PlayerLeft> humanLike_playerLeftListener = new IWorldEventListener<PlayerLeft>() {
361 @Override
362 public void notify(PlayerLeft event) {
363 processPlayerLeftEvent(event);
364 }
365 };
366
367
368
369 IWorldEventListener<PlayerScore> humanLike_playerScoreListener = new IWorldEventListener<PlayerScore>() {
370 @Override
371 public void notify(PlayerScore event) {
372 processPlayerScoreEvent(event);
373 }
374 };
375
376
377
378 IWorldEventListener<RecordingEnded> humanLike_recordingEndedListener = new IWorldEventListener<RecordingEnded>() {
379 @Override
380 public void notify(RecordingEnded event) {
381 processRecordingEndedEvent(event);
382 }
383 };
384
385
386
387 IWorldEventListener<RecordingStarted> humanLike_recordingStartedListener = new IWorldEventListener<RecordingStarted>() {
388 @Override
389 public void notify(RecordingStarted event) {
390 processRecordingStartedEvent(event);
391 }
392 };
393
394
395
396 IWorldObjectEventListener<Self, WorldObjectUpdatedEvent<Self>> humanLike_selfListener = new IWorldObjectEventListener<Self, WorldObjectUpdatedEvent<Self>>() {
397 @Override
398 public void notify(WorldObjectUpdatedEvent<Self> event) {
399 processSelfEvent(event);
400 }
401 };
402
403
404
405 IWorldEventListener<ShootingStarted> humanLike_shootingStartedListener = new IWorldEventListener<ShootingStarted>() {
406 @Override
407 public void notify(ShootingStarted event) {
408 processShootingStartedEvent(event);
409 }
410 };
411
412
413
414 IWorldEventListener<ShootingStopped> humanLike_shootingStoppedListener = new IWorldEventListener<ShootingStopped>() {
415 @Override
416 public void notify(ShootingStopped event) {
417 processShootingStoppedEvent(event);
418 }
419 };
420
421
422
423 IWorldEventListener<Spawn> humanLike_spawnListener = new IWorldEventListener<Spawn>() {
424 @Override
425 public void notify(Spawn event) {
426 processSpawnEvent(event);
427 }
428 };
429
430
431
432 IWorldEventListener<Thrown> humanLike_thrownListener = new IWorldEventListener<Thrown>() {
433 @Override
434 public void notify(Thrown event) {
435 processThrownEvent(event);
436 }
437 };
438
439
440
441 IWorldEventListener<WallCollision> humanLike_wallCollisionListener = new IWorldEventListener<WallCollision>() {
442 @Override
443 public void notify(WallCollision event) {
444 processWallCollisionEvent(event);
445 }
446 };
447
448
449
450 IWorldEventListener<WeaponUpdate> humanLike_weaponUpdateListener = new IWorldEventListener<WeaponUpdate>() {
451 @Override
452 public void notify(WeaponUpdate event) {
453 processWeaponUpdateEvent(event);
454 }
455 };
456
457 protected void save(String name, Long time, String type, String message) {
458 String output = name + humanLike_DELIMITER + time.toString() + humanLike_DELIMITER + type + humanLike_DELIMITER + message + "\n";
459 synchronized(humanLike_writer) {
460 humanLike_writer.print(output);
461 }
462 }
463
464
465
466
467
468
469 private void processAddInventoryMsgEvent(AddInventoryMsg event) {
470 save(humanLike_playerName, event.getSimTime(), "AddInventoryMsg", event.toString());
471 }
472
473
474
475
476
477
478 private void processAdrenalineGainedEvent(AdrenalineGained event) {
479 save(humanLike_playerName, event.getSimTime(), "AdrenalineGained", event.toString());
480 }
481
482
483
484
485
486
487 private void processBumpedEvent(Bumped event) {
488 save(humanLike_playerName, event.getSimTime(), "Bumped", event.toString());
489 }
490
491
492
493
494
495
496 private void processChangedWeaponEvent(ChangedWeapon event) {
497 save(humanLike_playerName, event.getSimTime(), "ChangedWeapon", event.toString());
498 }
499
500
501
502
503
504
505 private void processComboStartedEvent(ComboStarted event) {
506 save(humanLike_playerName, event.getSimTime(), "ComboStarted", event.toString());
507 }
508
509
510
511
512
513
514 private void processFallEdgeEvent(FallEdge event) {
515 save(humanLike_playerName, event.getSimTime(), "FallEdge", event.toString());
516 }
517
518
519
520
521
522
523 private void processGameInfoEvent(GameInfo event) {
524 save(humanLike_playerName, event.getSimTime(), "GameInfo", event.toString());
525 }
526
527
528
529
530
531
532 private void processGlobalChatEvent(GlobalChat event) {
533 save(humanLike_playerName, event.getSimTime(), "GlobalChat", event.toString());
534 }
535
536
537
538
539
540
541 private void processHearNoiseEvent(HearNoise event) {
542 save(humanLike_playerName, event.getSimTime(), "HearNoise", event.toString());
543 }
544
545
546
547
548
549
550 private void processHearPickupEvent(HearPickup event) {
551 save(humanLike_playerName, event.getSimTime(), "HearPickup", event.toString());
552 }
553
554
555
556
557
558
559 private void processIncomingProjectileEvent(IncomingProjectile event) {
560 save(humanLike_playerName, event.getSimTime(), "IncomingProjectile", event.toString());
561 }
562
563
564
565
566
567
568 private void processItemPickedUpEvent(ItemPickedUp event) {
569 save(humanLike_playerName, event.getSimTime(), "ItemPickedUp", event.toString());
570 }
571
572
573
574
575
576
577 private void processJumpPerformedEvent(JumpPerformed event) {
578 save(humanLike_playerName, event.getSimTime(), "JumpPerformed", event.toString());
579 }
580
581
582
583
584
585
586 private void processLandedEvent(Landed event) {
587 save(humanLike_playerName, event.getSimTime(), "Landed", event.toString());
588 }
589
590
591
592
593
594
595 private void processLostChildEvent(LostChild event) {
596 save(humanLike_playerName, event.getSimTime(), "LostChild", event.toString());
597 }
598
599
600
601
602
603
604 private void processPlayerDamagedEvent(PlayerDamaged event) {
605 save(humanLike_playerName, event.getSimTime(), "PlayerDamaged", event.toString());
606 }
607
608
609
610
611
612
613 private void processPlayerJoinsGameEvent(PlayerJoinsGame event) {
614 save(humanLike_playerName, event.getSimTime(), "PlayerJoinsGame", event.toString());
615 }
616
617
618
619
620
621
622 private void processPlayerKilledEvent(PlayerKilled event) {
623 save(humanLike_playerName, event.getSimTime(), "PlayerKilled", event.toString());
624 }
625
626
627
628
629
630
631 private void processPlayerLeftEvent(PlayerLeft event) {
632 save(humanLike_playerName, event.getSimTime(), "PlayerLeft", event.toString());
633 }
634
635
636
637
638
639
640 private void processPlayerScoreEvent(PlayerScore event) {
641 save(humanLike_playerName, event.getSimTime(), "PlayerScore", event.toString());
642 }
643
644
645
646
647
648
649 private void processRecordingEndedEvent(RecordingEnded event) {
650 save(humanLike_playerName, event.getSimTime(), "RecordingEnded", event.toString());
651 }
652
653
654
655
656
657
658 private void processRecordingStartedEvent(RecordingStarted event) {
659 save(humanLike_playerName, event.getSimTime(), "RecordingStarted", event.toString());
660 }
661
662
663
664
665
666
667 private void processSelfEvent(WorldObjectUpdatedEvent<Self> event) {
668 save(humanLike_playerName, event.getObject().getSimTime(), "Self", event.getObject().toString());
669 processEnemyEvent(event);
670 }
671
672
673
674
675
676
677 private void processShootingStartedEvent(ShootingStarted event) {
678 save(humanLike_playerName, event.getSimTime(), "ShootingStarted", event.toString());
679 }
680
681
682
683
684
685
686 private void processShootingStoppedEvent(ShootingStopped event) {
687 save(humanLike_playerName, event.getSimTime(), "ShootingStopped", event.toString());
688 }
689
690
691
692
693
694
695 private void processSpawnEvent(Spawn event) {
696 save(humanLike_playerName, event.getSimTime(), "Spawn", event.toString());
697 }
698
699
700
701
702
703
704 private void processThrownEvent(Thrown event) {
705 save(humanLike_playerName, event.getSimTime(), "Thrown", event.toString());
706 }
707
708
709
710
711
712
713 private void processWallCollisionEvent(WallCollision event) {
714 save(humanLike_playerName, event.getSimTime(), "WallCollision", event.toString());
715 }
716
717
718
719
720
721
722 private void processWeaponUpdateEvent(WeaponUpdate event) {
723 save(humanLike_playerName, event.getSimTime(), "WeaponUpdate", event.toString());
724 }
725
726
727
728
729
730
731 private void processEnemyEvent(WorldObjectUpdatedEvent<Self> event) {
732 locateEnemy(event);
733 if (humanLike_enemy != null) {
734 save(humanLike_playerName, event.getObject().getSimTime(), "Enemy", humanLike_enemy.toString());
735 }
736 }
737
738
739
740
741
742
743
744 private void locateEnemy(WorldObjectUpdatedEvent<Self> event) {
745 humanLike_enemy = DistanceUtils.getNearestVisible(getWorldView().getAllVisible(Player.class).values(), event.getObject().getLocation());
746 if (humanLike_enemy != null && humanLike_enemy.getName().toString().equals(humanLike_playerName)) {
747 humanLike_enemy = null;
748 }
749 }
750
751
752
753
754
755
756
757
758 protected void initializeHumanLikeObserving(String observedPlayer, PrintWriter printWriter) {
759
760
761 humanLike_writer = printWriter;
762 if (humanLike_writer == null) {
763 throw new RuntimeException("humanLike_writer is null! Invalid observer parameters passed...");
764 }
765
766
767 getWorldView().addEventListener(AddInventoryMsg.class, humanLike_addInventoryMsgListener);
768 getWorldView().addEventListener(AdrenalineGained.class, humanLike_adrenalineGainedListener);
769 getWorldView().addEventListener(Bumped.class, humanLike_bumpedListener);
770 getWorldView().addEventListener(ChangedWeapon.class, humanLike_changedWeaponListener);
771 getWorldView().addEventListener(ComboStarted.class, humanLike_comboStartedListener);
772 getWorldView().addEventListener(FallEdge.class, humanLike_fallEdgeListener);
773 getWorldView().addEventListener(GameInfo.class, humanLike_gameInfoListener);
774 getWorldView().addEventListener(GlobalChat.class, humanLike_globalChatListener);
775 getWorldView().addEventListener(HearNoise.class, humanLike_hearNoiseListener);
776 getWorldView().addEventListener(HearPickup.class, humanLike_hearPickupListener);
777 getWorldView().addEventListener(IncomingProjectile.class, humanLike_incomingProjectileListener);
778 getWorldView().addEventListener(ItemPickedUp.class, humanLike_itemPickedUpListener);
779 getWorldView().addEventListener(JumpPerformed.class, humanLike_jumpPerformedListener);
780 getWorldView().addEventListener(Landed.class, humanLike_landedListener);
781 getWorldView().addEventListener(LostChild.class, humanLike_lostChildListener);
782 getWorldView().addEventListener(PlayerDamaged.class, humanLike_playerDamagedListener);
783 getWorldView().addEventListener(PlayerJoinsGame.class, humanLike_playerJoinsGameListener);
784 getWorldView().addEventListener(PlayerKilled.class, humanLike_playerKilledListener);
785 getWorldView().addEventListener(PlayerLeft.class, humanLike_playerLeftListener);
786 getWorldView().addEventListener(PlayerScore.class, humanLike_playerScoreListener);
787 getWorldView().addEventListener(RecordingEnded.class, humanLike_recordingEndedListener);
788 getWorldView().addEventListener(RecordingStarted.class, humanLike_recordingStartedListener);
789 getWorldView().addObjectListener(Self.class, WorldObjectUpdatedEvent.class, humanLike_selfListener);
790 getWorldView().addEventListener(ShootingStarted.class, humanLike_shootingStartedListener);
791 getWorldView().addEventListener(ShootingStopped.class, humanLike_shootingStoppedListener);
792 getWorldView().addEventListener(Spawn.class, humanLike_spawnListener);
793 getWorldView().addEventListener(Thrown.class, humanLike_thrownListener);
794 getWorldView().addEventListener(WallCollision.class, humanLike_wallCollisionListener);
795 getWorldView().addEventListener(WeaponUpdate.class, humanLike_weaponUpdateListener);
796
797
798 humanLike_playerName = observedPlayer;
799 }
800
801 }