Jamie Slowgrove - MGP Assignment 2 - JAM
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Macros
jni
src
JAM
Entity.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Texture.h
"
4
#include "
Vec2.h
"
5
10
class
JAM_Entity
11
{
12
private
:
14
JAM_Texture
*
sprite
;
16
JAM_Vec2
position
;
18
JAM_Vec2
dimensions
;
19
20
public
:
29
JAM_Entity
(
JAM_Texture
* sprite,
float
x,
float
y,
float
width,
float
height);
30
34
~JAM_Entity
();
35
40
virtual
void
update
(
float
dt) = 0;
41
46
void
draw
(SDL_Renderer* renderer);
47
53
void
setPosition
(
float
x,
float
y);
54
59
void
setPosition
(
JAM_Vec2
position);
60
65
void
setX
(
float
x);
66
71
void
setY
(
float
y);
72
78
void
setDimensions
(
float
width,
float
height);
79
84
void
setDimensions
(
JAM_Vec2
dimensions);
85
90
void
setWidth
(
float
width);
91
96
void
setHeight
(
float
height);
97
102
JAM_Vec2
getPosition
();
103
108
JAM_Vec2
getDimensions
();
109
};
Texture.h
JAM_Entity::~JAM_Entity
~JAM_Entity()
Definition:
Entity.cpp:17
JAM_Entity::setX
void setX(float x)
Definition:
Entity.cpp:51
JAM_Entity::getDimensions
JAM_Vec2 getDimensions()
Definition:
Entity.cpp:114
JAM_Entity::draw
void draw(SDL_Renderer *renderer)
Definition:
Entity.cpp:24
JAM_Entity::sprite
JAM_Texture * sprite
Definition:
Entity.h:14
JAM_Texture
Creates a Texture for use with a renderer. Creates a Texture from an image file, this can then be use...
Definition:
Texture.h:13
JAM_Entity::getPosition
JAM_Vec2 getPosition()
Definition:
Entity.cpp:105
JAM_Entity::setWidth
void setWidth(float width)
Definition:
Entity.cpp:87
Vec2.h
JAM_Entity::setDimensions
void setDimensions(float width, float height)
Definition:
Entity.cpp:69
JAM_Entity::setHeight
void setHeight(float height)
Definition:
Entity.cpp:96
JAM_Entity::dimensions
JAM_Vec2 dimensions
Definition:
Entity.h:18
JAM_Entity::JAM_Entity
JAM_Entity(JAM_Texture *sprite, float x, float y, float width, float height)
Definition:
Entity.cpp:6
JAM_Entity::setPosition
void setPosition(float x, float y)
Definition:
Entity.cpp:33
JAM_Entity::setY
void setY(float y)
Definition:
Entity.cpp:60
JAM_Entity
Creates an Entity object.
Definition:
Entity.h:10
JAM_Entity::update
virtual void update(float dt)=0
JAM_Vec2
Creates an Vec2 structure with functions. Creates an Vec2 structure with overloaded operators to crea...
Definition:
Vec2.h:9
JAM_Entity::position
JAM_Vec2 position
Definition:
Entity.h:16
Generated on Fri May 8 2015 04:35:28 for Jamie Slowgrove - MGP Assignment 2 - JAM by
1.8.8