El Octavio
1.0
This is a video game about adventures.
El Octavo-Functions.h
Go to the documentation of this file.
1
#pragma once
2
#include "
Precompile.h
"
3
4
bool
checkCollideWithGround
(
RectangleShape
& body);
5
6
void
setVars
();
7
8
void
setup
(
RenderWindow
& window);
9
10
bool
checkCollideWithRamp
(
RectangleShape
& body);
11
12
Vector2f
getRampPos
();
13
14
class
CollisionBlock
{
15
public
:
16
RectangleShape
hitbox
;
17
18
CollisionBlock
(
Vector2f
pos,
Vector2f
size);
19
20
~CollisionBlock
();
21
22
void
drawHitbox
(
RenderWindow
& window);
23
24
bool
checkForCollision
(
RectangleShape
& body);
25
};
26
27
class
Npc
{
28
private
:
29
30
// build variables
31
float
totalTime;
32
float
switchTime;
33
34
string
name;
35
string
nestashev =
"NESTASHEV"
;
36
37
Vector2u
imageCount;
38
Vector2u
currentImage;
39
40
// movement variables
41
unsigned
int
row;
42
float
speed;
43
44
float
distance;
45
int
posIndex;
46
47
Clock
npcClock;
48
Time
npcPreviousTime;
49
Time
npcCurrentTime;
50
51
bool
reset;
52
53
54
public
:
55
bool
faceLeft
;
56
IntRect
uvRect
;
57
RectangleShape
body
;
58
Vector2f
velocity
;
59
bool
delay
;
60
61
Npc
(
Texture
*
texture
,
Vector2u
imageCount,
float
switchTime,
float
speed,
string
name);
62
~Npc
();
63
64
void
draw
(
RenderWindow
& window);
65
void
moveX
(
float
amount);
66
void
update
(
int
row,
float
deltaTime
,
bool
delay
);
67
void
moveTo
(
float
pos[],
float
deltaTime
,
bool
&
done
,
bool
&
faceLeft
);
68
};
setVars
void setVars()
Definition:
El Octavo-Functions.cpp:227
checkCollideWithRamp
bool checkCollideWithRamp(RectangleShape &body)
Definition:
El Octavo-Functions.cpp:490
getRampPos
Vector2f getRampPos()
Definition:
El Octavo-Functions.cpp:516
checkCollideWithGround
bool checkCollideWithGround(RectangleShape &body)
Definition:
El Octavo-Functions.cpp:486
setup
void setup(RenderWindow &window)
Definition:
El Octavo-Functions.cpp:307
Precompile.h
CollisionBlock
Definition:
El Octavo-Functions.h:14
CollisionBlock::drawHitbox
void drawHitbox(RenderWindow &window)
Definition:
El Octavo-Functions.cpp:136
CollisionBlock::CollisionBlock
CollisionBlock(Vector2f pos, Vector2f size)
Definition:
El Octavo-Functions.cpp:119
CollisionBlock::hitbox
RectangleShape hitbox
Definition:
El Octavo-Functions.h:16
CollisionBlock::checkForCollision
bool checkForCollision(RectangleShape &body)
Definition:
El Octavo-Functions.cpp:127
CollisionBlock::~CollisionBlock
~CollisionBlock()
Definition:
El Octavo-Functions.cpp:124
Npc
Definition:
El Octavo-Functions.h:27
Npc::~Npc
~Npc()
Definition:
El Octavo-Functions.cpp:33
Npc::draw
void draw(RenderWindow &window)
Definition:
El Octavo-Functions.cpp:36
Npc::uvRect
IntRect uvRect
Definition:
El Octavo-Functions.h:56
Npc::body
RectangleShape body
Definition:
El Octavo-Functions.h:57
Npc::update
void update(int row, float deltaTime, bool delay)
Definition:
El Octavo-Functions.cpp:44
Npc::delay
bool delay
Definition:
El Octavo-Functions.h:59
Npc::Npc
Npc(Texture *texture, Vector2u imageCount, float switchTime, float speed, string name)
Definition:
El Octavo-Functions.cpp:8
Npc::moveX
void moveX(float amount)
Definition:
El Octavo-Functions.cpp:40
Npc::faceLeft
bool faceLeft
Definition:
El Octavo-Functions.h:55
Npc::moveTo
void moveTo(float pos[], float deltaTime, bool &done, bool &faceLeft)
Definition:
El Octavo-Functions.cpp:75
Npc::velocity
Vector2f velocity
Definition:
El Octavo-Functions.h:58
sf::Clock
Utility class that measures the elapsed time.
Definition:
Clock.hpp:42
sf::Rect< int >
sf::RectangleShape
Specialized shape representing a rectangle.
Definition:
RectangleShape.hpp:42
sf::RenderWindow
Window that can serve as a target for 2D drawing.
Definition:
RenderWindow.hpp:45
sf::Texture
Image living on the graphics card that can be used for drawing.
Definition:
Texture.hpp:49
sf::Time
Represents a time value.
Definition:
Time.hpp:41
sf::Vector2< float >
variables::done
bool done
Definition:
El Octavo-Functions.cpp:199
variables::texture
Texture texture
Definition:
Menu.cpp:17
variables::deltaTime
float deltaTime
Definition:
El Octavo-Functions.cpp:143
Program
Game
Header files
El Octavo-Functions.h
Generated by
1.9.4