-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditorMode.cpp
More file actions
41 lines (29 loc) · 773 Bytes
/
EditorMode.cpp
File metadata and controls
41 lines (29 loc) · 773 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
37
38
39
40
41
#include "stdafx.h"
#include "EditorMode.h"
//Constructors and Destructor:
EditorMode::EditorMode(StateData* state_data, TileMap* tile_map, EditorStateData* editor_state_data)
: stateData(state_data), tileMap(tile_map), editorStateData(editor_state_data)
{
}
EditorMode::~EditorMode()
{
}
//Accessors:
const bool EditorMode::getKeyTime()
{
if (this->editorStateData->keyTimer->getElapsedTime().asSeconds() >= *this->editorStateData->keyTimeMax)
{
this->editorStateData->keyTimer->restart();
return true;
}
return false;
}
const bool EditorMode::getKeyTime(const float key_time_max)
{
if (this->editorStateData->keyTimer->getElapsedTime().asSeconds() >= key_time_max)
{
this->editorStateData->keyTimer->restart();
return true;
}
return false;
}