EchoesOfFate
A game for our COMP315 Project
 
Loading...
Searching...
No Matches
Interactable.h
Go to the documentation of this file.
1#ifndef INTERACTABLE_H
2#define INTERACTABLE_H
3
4#include <SFML/Graphics.hpp>
5#include <iostream>
6#include <string>
7
8#include "Player.h"
9
10using namespace sf;
11
13{
14 private:
15 Font font;
16 Text interactionText;
17 Texture objectTexture;
18 Sprite object;
19 std::string objectName;
20 float interactableRadius;
21 float interactableXRelMap;
22 float interactableYRelMap;
23 bool interacted;
24
25 public:
26 Interactable(std::string interactableTexturePath, std::string interactableName, float interactableRadius,
27 float interactableXRelMap, float interactableYRelMap);
28 float getRadius() const;
29 bool playerInRange(const Player& player);
30 virtual void update(RenderWindow& window, const Player& player);
31 void drawInteractable(RenderWindow& window, const Player& player);
32};
33
34#endif
bool playerInRange(const Player &player)
Definition Interactable.cpp:37
float getRadius() const
Definition Interactable.cpp:44
virtual void update(RenderWindow &window, const Player &player)
Definition Interactable.cpp:49
Interactable(std::string interactableTexturePath, std::string interactableName, float interactableRadius, float interactableXRelMap, float interactableYRelMap)
Definition Interactable.cpp:3
void drawInteractable(RenderWindow &window, const Player &player)
Definition Interactable.cpp:72
Definition Player.h:17