PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
pk::Bullet Class Reference

#include <Bullet.hpp>

Collaboration diagram for pk::Bullet:
Collaboration graph

Public Member Functions

 Bullet ()
 
 Bullet (b2World *world, GLRect rect, float delay)
 
virtual ~Bullet ()
 
void setVelocity (glm::vec2 velocity)
 
glm::vec2 getVelocity ()
 
glm::vec2 getPosition ()
 
void setPosition (glm::vec2 position)
 
float getRotation ()
 
void fire (float speed)
 
bool isAlive ()
 

Private Attributes

b2World * m_world
 
DynamicBody m_body
 
double m_aliveTime
 
double m_destroyDelay
 

Constructor & Destructor Documentation

◆ Bullet() [1/2]

pk::Bullet::Bullet ( )

◆ Bullet() [2/2]

pk::Bullet::Bullet ( b2World *  world,
GLRect  rect,
float  delay 
)

◆ ~Bullet()

virtual pk::Bullet::~Bullet ( )
virtual

Member Function Documentation

◆ fire()

void pk::Bullet::fire ( float  speed)

◆ getPosition()

glm::vec2 pk::Bullet::getPosition ( )

◆ getRotation()

float pk::Bullet::getRotation ( )

◆ getVelocity()

glm::vec2 pk::Bullet::getVelocity ( )

◆ isAlive()

bool pk::Bullet::isAlive ( )

◆ setPosition()

void pk::Bullet::setPosition ( glm::vec2  position)

◆ setVelocity()

void pk::Bullet::setVelocity ( glm::vec2  velocity)

Member Data Documentation

◆ m_aliveTime

double pk::Bullet::m_aliveTime
private

◆ m_body

DynamicBody pk::Bullet::m_body
private

◆ m_destroyDelay

double pk::Bullet::m_destroyDelay
private

◆ m_world

b2World* pk::Bullet::m_world
private

The documentation for this class was generated from the following file: