19 #ifndef HEADER_SWATTER_HPP
20 #define HEADER_SWATTER_HPP
22 #include "config/stk_config.hpp"
23 #include "items/attachment_plugin.hpp"
24 #include "utils/cpp2011.hpp"
25 #include "utils/no_copy.hpp"
35 class IAnimatedMeshSceneNode;
62 SWATTER_TO_TARGET = 1,
63 SWATTER_FROM_TARGET = 2
65 AnimationPhase m_animation_phase;
83 int m_swatter_duration;
89 int16_t m_swatter_animation_ticks;
100 void updateGraphics(
float dt) OVERRIDE;
101 bool updateAndTestFinished() OVERRIDE;
106 bool isSwatterReady()
const
108 return m_animation_phase == SWATTER_AIMING;
120 void pointToTarget();
123 void squashThingsAround();
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
This is the base class for a plugin into an attachment.
Definition: attachment_plugin.hpp:39
This objects is permanently available in a kart and stores information about addons.
Definition: attachment.hpp:52
Describes a chain of 8-bit unsigned integers.
Definition: network_string.hpp:53
Definition: moveable.hpp:46
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
The base class for sound effects.
Definition: sfx_base.hpp:43
Definition: swatter.hpp:51
AbstractKart * m_closest_kart
The kart the swatter is aiming at.
Definition: swatter.hpp:68
AnimationPhase
State of the animation, the swatter is successively:
Definition: swatter.hpp:60
int16_t m_bomb_remaining
Set the bomb remaing ticks so we can set the timer on the removing bomb animation.
Definition: swatter.hpp:87
bool m_discard_now
True if the swatter will be discarded now.
Definition: swatter.hpp:92
scene::IAnimatedMeshSceneNode * m_scene_node
Set the end ticks to complete the removing an attached bomb animation.
Definition: swatter.hpp:75
bool m_played_swatter_animation
True if the swatter animation has been played.
Definition: swatter.hpp:95
scene::IAnimatedMeshSceneNode * m_bomb_scene_node
The scene node where a bomb is saved (in case that the swatter replaces a bomb.
Definition: swatter.hpp:79