-
Notifications
You must be signed in to change notification settings - Fork 0
/
Colors.cpp
52 lines (42 loc) · 1.13 KB
/
Colors.cpp
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "Colors.hpp"
Colors::Colors(Type type)
: mType(type)
, mData(Colors::TypeCount)
{
mData[Colors::Light].road = { 100, 100, 100 };
mData[Colors::Light].grass = { 16, 170, 16 };
mData[Colors::Light].rumble = { 85, 85 , 85 };
mData[Colors::Light].lanes = { 204, 204, 204 };
mData[Colors::Dark].road = { 100, 100, 100 };
mData[Colors::Dark].grass = { 0, 154, 0 };
mData[Colors::Dark].rumble = { 187,187, 187 };
mData[Colors::Dark].lanes = { 100, 100, 100 };
mData[Colors::Start].road = sf::Color::White;
mData[Colors::Start].grass = { 16, 170, 16 };
mData[Colors::Start].rumble = sf::Color::White;
mData[Colors::Start].lanes = sf::Color::White;
mData[Colors::Finish].road = {};
mData[Colors::Finish].grass = { 16, 170, 16 };
mData[Colors::Finish].rumble = {};
mData[Colors::Finish].lanes = {};
}
void Colors::setType(Type type)
{
mType = type;
}
sf::Color Colors::getRoad() const
{
return mData[mType].road;
}
sf::Color Colors::getGrass() const
{
return mData[mType].grass;
}
sf::Color Colors::getRumble() const
{
return mData[mType].rumble;
}
sf::Color Colors::getLane() const
{
return mData[mType].lanes;
}