Emergency 20 Dokumentation  4.2.0
SwingComponent-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Namespace ]
6 //[-------------------------------------------------------]
7 namespace em5
8 {
9 
10 
11  //[-------------------------------------------------------]
12  //[ Public methods ]
13  //[-------------------------------------------------------]
15  {
16  // Nothing here
17  }
18 
20  {
21  return mAnimationType;
22  }
23 
25  {
26  assignAndPromoteChange(mAnimationType, animationType, ANIMATION_TYPE);
27  }
28 
29  inline float SwingComponent::getAnimationCycle() const
30  {
31  return mAnimationCycle;
32  }
33 
34  inline void SwingComponent::setAnimationCycle(float animationCycle)
35  {
36  assignAndPromoteChange(mAnimationCycle, animationCycle, ANIMATION_CYCLE);
37  }
38 
40  {
41  return mAnimationIntensity;
42  }
43 
44  inline void SwingComponent::setAnimationIntensity(float animationIntensity)
45  {
46  assignAndPromoteChange(mAnimationIntensity, animationIntensity, ANIMATION_INTENSITY);
47  }
48 
49  inline float SwingComponent::getVelocitySkew() const
50  {
51  return mVelocitySkew;
52  }
53 
54  inline void SwingComponent::setVelocitySkew(float velocitySkew)
55  {
56  assignAndPromoteChange(mVelocitySkew, velocitySkew, VELOCITY_SKEW);
57  }
58 
59 
60 //[-------------------------------------------------------]
61 //[ Namespace ]
62 //[-------------------------------------------------------]
63 } // em5
Definition: ActionPriority.h:13
float getAnimationIntensity() const
Get/Set the animation intensity factor.
Definition: SwingComponent-inl.h:39
void setAnimationType(AnimationType animationType)
Definition: SwingComponent-inl.h:24
float getVelocitySkew() const
Get/Set if velocity will skew the unit; also used for acceleration!
Definition: SwingComponent-inl.h:49
AnimationType
Definition: SwingComponent.h:60
static const uint32 VELOCITY_SKEW
"VelocitySkew" unique class property ID inside the class
Definition: SwingComponent.h:54
static const uint32 ANIMATION_INTENSITY
"AnimationIntensity" unique class property ID inside the class
Definition: SwingComponent.h:53
static const uint32 ANIMATION_CYCLE
"AnimationCycle" unique class property ID inside the class
Definition: SwingComponent.h:52
float getAnimationCycle() const
Get/Set the animation cycle in seconds.
Definition: SwingComponent-inl.h:29
virtual ~SwingComponent()
Destructor.
Definition: SwingComponent-inl.h:14
void setAnimationCycle(float animationCycle)
Definition: SwingComponent-inl.h:34
AnimationType getAnimationType() const
Get/Set the animation type.
Definition: SwingComponent-inl.h:19
void setAnimationIntensity(float animationIntensity)
Definition: SwingComponent-inl.h:44
static const uint32 ANIMATION_TYPE
"AnimationType" unique class property ID inside the class
Definition: SwingComponent.h:51
bool assignAndPromoteChange(T &variable, const S &newValue, uint32 propertyId)
Comfort function for updating an exported member variable and promoting any change that happened...
Definition: Component-inl.h:141
void setVelocitySkew(float velocitySkew)
Definition: SwingComponent-inl.h:54