View Javadoc

1   package cz.cuni.amis.pogamut.sposh.ut2004.lib;
2   
3   import cz.cuni.amis.pogamut.base.communication.command.IAct;
4   import cz.cuni.amis.pogamut.sposh.engine.VariableContext;
5   import cz.cuni.amis.pogamut.sposh.executor.IAction;
6   import cz.cuni.amis.pogamut.ut2004.bot.command.SimpleLocomotion;
7   
8   /**
9    * Make bot jump into the air.
10   * @author Honza H.
11   */
12  public class ActionJump implements IAction {
13  
14      private final SimpleLocomotion locomotion;
15  
16      public ActionJump(SimpleLocomotion locomotion) {
17          this.locomotion = locomotion;
18      }
19  
20      @Override
21      public void init(VariableContext ctx) {
22      }
23  
24      @Override
25      public Object run(VariableContext ctx) {
26          locomotion.jump();
27          return true;
28      }
29  
30      @Override
31      public void done(VariableContext ctx) {
32      }
33  }