View Javadoc

1   package cz.cuni.amis.pogamut.defcon.ai;
2   
3   import cz.cuni.amis.pogamut.base.communication.worldview.object.WorldObjectId;
4   import cz.cuni.amis.pogamut.defcon.base3d.worldview.object.DefConLocation;
5   import cz.cuni.amis.pogamut.defcon.communication.mailbox.IMessage;
6   
7   /**
8    * Topmost interface for unit AI.
9    * 
10   * @author Radek 'Black_Hand' Pibil
11   * 
12   */
13  public interface IUnitAI {
14  	/**
15  	 * Update method called before the main AI.
16  	 */
17  	void update();
18  
19  	/**
20  	 * Receives a message from mailbox.
21  	 * 
22  	 * @param message
23  	 */
24  	void receiveMessage(IMessage message);
25  
26  	/**
27  	 * Returns the {@link WorldObjectId} of the associated unit.
28  	 * 
29  	 * @return
30  	 */
31  	WorldObjectId getId();
32  
33  	/**
34  	 * Unregisters ai from all places. ALWAYS CALL SUPER.DISPOSE!
35  	 */
36  	void dispose();
37  
38  	/**
39  	 * Retrieves location of the controlled object.
40  	 * 
41  	 * @return location
42  	 */
43  	DefConLocation getLocation();
44  
45  }