-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTradeComponent.h
More file actions
36 lines (27 loc) · 899 Bytes
/
TradeComponent.h
File metadata and controls
36 lines (27 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#define TRADECOMPONENT_H
#include "Trade.h"
class GamePlayers;
class OperationsComponent;
class TradeComponent
{
bool active;
sf::Font* font;
GamePlayers* players;
OperationsComponent* operations;
std::vector<Space*> spaces;
std::vector<CounterTrade*> incometrades;
std::vector<Trade*> outtrades;
void initVariables();
void initTrades();
public:
TradeComponent(sf::Font* font, GamePlayers* players, OperationsComponent* operations);
virtual ~TradeComponent();
void setActive(bool state);
bool isActive();
void createOffer(short senderID, short recipientID, Space* space);
void updateIncomeTrade(const sf::Vector2f mousePos, short playerID);
void updateOutTrade(const sf::Vector2f mousePos, short playerID);
void update(const sf::Vector2f mousePos, short playerID);
void render(sf::RenderTarget* target, short playerID);
};