PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
Ghost.hpp
Go to the documentation of this file.
1 #ifndef GHOST_HPP
2 #define GHOST_HPP
3 
4 #include "core/Game.hpp"
6 #include "graphics/GLSprite.hpp"
7 #include "steeriously/libinc.hpp"
8 
9 namespace pk
10 {
11 
12 class Ghost
13 {
14  public:
15  Ghost(b2World* world, GLTexture& texture, GLRect rect, steer::BehaviorParameters* params);
16  virtual ~Ghost();
17 
19 
20  void setChaseSpeed(float speed){ m_seek.setWeight(speed); };
21 
22  void update(float dt, const glm::vec2& target);
23 
24  private:
25  b2World* m_world;
28  steer::SeekComponent m_seek;
29  float m_chaseSpeed;
30 };
31 
32 }
33 
34 #endif // GHOST_HPP
Definition: Game.hpp:7
virtual ~Ghost()
b2World * m_world
Definition: Ghost.hpp:25
steer::SeekComponent m_seek
Definition: Ghost.hpp:28
Ghost(b2World *world, GLTexture &texture, GLRect rect, steer::BehaviorParameters *params)
pk::GLSprite & getSprite()
Definition: Ghost.hpp:18
void setChaseSpeed(float speed)
Definition: Ghost.hpp:20
pk::GLSprite m_sprite
Definition: Ghost.hpp:27
Definition: Ghost.hpp:12
float m_chaseSpeed
Definition: Ghost.hpp:29
pk::KinematicBody m_body
Definition: Ghost.hpp:26
Useful for defining size and origin of an OpenGL object.
Definition: GLTransformable.hpp:15
A class wrapper to ease the instantiation and use of Box2D kinematic bodies. It also performs convers...
Definition: KinematicBody.hpp:20
Class for creating textures usable with OpenGL from SDL.
Definition: GLTexture.hpp:57
void update(float dt, const glm::vec2 &target)
Definition: GLSprite.hpp:13