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
5
6void setVars();
7
8void setup(RenderWindow& window);
9
11
13
15public:
17
19
21
22 void drawHitbox(RenderWindow& window);
23
25};
26
27class Npc {
28private:
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
54public:
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};
void setVars()
bool checkCollideWithRamp(RectangleShape &body)
Vector2f getRampPos()
bool checkCollideWithGround(RectangleShape &body)
void setup(RenderWindow &window)
void drawHitbox(RenderWindow &window)
CollisionBlock(Vector2f pos, Vector2f size)
RectangleShape hitbox
bool checkForCollision(RectangleShape &body)
void draw(RenderWindow &window)
IntRect uvRect
RectangleShape body
void update(int row, float deltaTime, bool delay)
Npc(Texture *texture, Vector2u imageCount, float switchTime, float speed, string name)
void moveX(float amount)
bool faceLeft
void moveTo(float pos[], float deltaTime, bool &done, bool &faceLeft)
Vector2f velocity
Utility class that measures the elapsed time.
Definition: Clock.hpp:42
Specialized shape representing a rectangle.
Window that can serve as a target for 2D drawing.
Image living on the graphics card that can be used for drawing.
Definition: Texture.hpp:49
Represents a time value.
Definition: Time.hpp:41
Texture texture
Definition: Menu.cpp:17