cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric
Class Animations

Package class diagram package Animations
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot>
          extended by cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric.Animations
All Implemented Interfaces:
IComponent

public class Animations
extends SensomotoricModule<UT2004Bot>

Module wrapping animation playing.

Author:
knight

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule
act, worldView
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
Animations(UT2004Bot agent)
           
Animations(UT2004Bot agent, Logger log)
           
 
Method Summary
 HashSet<AnimType> getAvailableAnimations()
          Returns all available animations for our character.
 HashSet<AnimType> getAvailableAnimations(CharacterType charType)
          Returns all available animations for a character.
 CharacterType getCurrentCharacter()
          Returns current character type.
 AnimType getCurrentPlayedAnimation()
          Returns current bot anim thas is currently being played.
 AnimType getPlayerAnimation(Player player)
          Returns current animation of input player.
 boolean hasAnim(AnimType anim)
          Returns true if our current character can play input animation.
 boolean hasAnim(AnimType anim, CharacterType charType)
          Returns true if input character can play input animation.
 void playAnimation(AnimType animation)
          Plays input animation on character once! Note that movement animations may override animation played this way!
 void playAnimation(AnimType animation, boolean bLoop)
          Plays input animation on character.
 void playAnimationSafe(AnimType animation, boolean bLoop)
          Plays input animation on character only if the character IS NOT playing this animation allready.
 void stopAnimation()
          Stops animation and replaces it with "standard" one.
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Animations

public Animations(UT2004Bot agent,
                  Logger log)

Animations

public Animations(UT2004Bot agent)
Method Detail

getPlayerAnimation

public AnimType getPlayerAnimation(Player player)
Returns current animation of input player.

Parameters:
player -
Returns:

hasAnim

public boolean hasAnim(AnimType anim)
Returns true if our current character can play input animation.

Parameters:
anim -
Returns:

hasAnim

public boolean hasAnim(AnimType anim,
                       CharacterType charType)
Returns true if input character can play input animation.

Parameters:
anim -
Returns:

getCurrentPlayedAnimation

public AnimType getCurrentPlayedAnimation()
Returns current bot anim thas is currently being played.

Returns:

getAvailableAnimations

public HashSet<AnimType> getAvailableAnimations(CharacterType charType)
Returns all available animations for a character.

Parameters:
charType -
Returns:

getAvailableAnimations

public HashSet<AnimType> getAvailableAnimations()
Returns all available animations for our character.

Parameters:
charType -
Returns:

playAnimation

public void playAnimation(AnimType animation,
                          boolean bLoop)
Plays input animation on character. Animation will be looped when bLoop set to true. Note that movement animations may override animation played this way!

Parameters:
animation -
bLoop -

playAnimationSafe

public void playAnimationSafe(AnimType animation,
                              boolean bLoop)
Plays input animation on character only if the character IS NOT playing this animation allready. Animation will be looped when bLoop set to true. Note that movement animations may override animation played this way!

Parameters:
animation -
bLoop -

playAnimation

public void playAnimation(AnimType animation)
Plays input animation on character once! Note that movement animations may override animation played this way!

Parameters:
animation -

stopAnimation

public void stopAnimation()
Stops animation and replaces it with "standard" one. NOTE: Not yet implemeted.


getCurrentCharacter

public CharacterType getCurrentCharacter()
Returns current character type. Null if not recognized or not set!!

Returns:


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.