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
"
5
#include "
physics/KinematicBody.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
18
pk::GLSprite
&
getSprite
(){
return
m_sprite
; };
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
;
26
pk::KinematicBody
m_body
;
27
pk::GLSprite
m_sprite
;
28
steer::SeekComponent
m_seek
;
29
float
m_chaseSpeed
;
30
};
31
32
}
33
34
#endif // GHOST_HPP
pk
Definition:
Game.hpp:7
pk::Ghost::~Ghost
virtual ~Ghost()
pk::Ghost::m_world
b2World * m_world
Definition:
Ghost.hpp:25
pk::Ghost::m_seek
steer::SeekComponent m_seek
Definition:
Ghost.hpp:28
KinematicBody.hpp
pk::Ghost::Ghost
Ghost(b2World *world, GLTexture &texture, GLRect rect, steer::BehaviorParameters *params)
pk::Ghost::getSprite
pk::GLSprite & getSprite()
Definition:
Ghost.hpp:18
pk::Ghost::setChaseSpeed
void setChaseSpeed(float speed)
Definition:
Ghost.hpp:20
pk::Ghost::m_sprite
pk::GLSprite m_sprite
Definition:
Ghost.hpp:27
pk::Ghost
Definition:
Ghost.hpp:12
pk::Ghost::m_chaseSpeed
float m_chaseSpeed
Definition:
Ghost.hpp:29
GLSprite.hpp
pk::Ghost::m_body
pk::KinematicBody m_body
Definition:
Ghost.hpp:26
pk::GLRect
Useful for defining size and origin of an OpenGL object.
Definition:
GLTransformable.hpp:15
pk::KinematicBody
A class wrapper to ease the instantiation and use of Box2D kinematic bodies. It also performs convers...
Definition:
KinematicBody.hpp:20
pk::GLTexture
Class for creating textures usable with OpenGL from SDL.
Definition:
GLTexture.hpp:57
pk::Ghost::update
void update(float dt, const glm::vec2 &target)
Game.hpp
pk::GLSprite
Definition:
GLSprite.hpp:13
include
gameplay
Ghost.hpp
Generated on Sun Dec 1 2019 17:04:22 for PROTO::KLUDGE by
1.8.14