[Pogamut-list] MessageObject

jakub.gemrot pogamut-forum at artemis.ms.mff.cuni.cz
Mon May 19 18:33:51 CEST 2008


Re: MessageObject
Hello again,

MessageObject is an ancestor of all other messages. Every message produced by the Gamebots has it's own Java object wrapper (like AddItem, Trace, etc.) classes of those objects (descendant of MessageObject) have various public fields. First you have to cast MessageObject you receive to a correct class (like SeePlayer) and then you will have those public fields accessible.

Note that every MessageObject has field 'type' (of enum MessageType) that is describing what message it is (however it's a bit silly field because that's why there is getClass() method on every object).

Jakub

----

Reply Link: <https://artemis.ms.mff.cuni.cz/pogamut/tiki-view_forum_thread.php?forumId=5&comments_reply_threadId=196&comments_parentId=186&post_reply=1#form>





More information about the Pogamut-list mailing list