mirror of
https://github.com/NoelFB/tiny_link.git
synced 2024-11-25 18:18:56 +08:00
few final tweaks
This commit is contained in:
parent
0b48a16c55
commit
ff31d139da
Binary file not shown.
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 291 B |
13
src/game.cpp
13
src/game.cpp
|
@ -33,6 +33,7 @@ void Game::startup()
|
||||||
// load first room
|
// load first room
|
||||||
load_room(Point(0, 0));
|
load_room(Point(0, 0));
|
||||||
camera = Vec2(room.x * width, room.y * height);
|
camera = Vec2(room.x * width, room.y * height);
|
||||||
|
fullscreen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::load_room(Point cell, bool is_reload)
|
void Game::load_room(Point cell, bool is_reload)
|
||||||
|
@ -169,6 +170,18 @@ void Game::update()
|
||||||
load_room(room);
|
load_room(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reload First Room
|
||||||
|
if (Input::pressed(Key::F9))
|
||||||
|
{
|
||||||
|
m_transition = false;
|
||||||
|
world.clear();
|
||||||
|
load_room(Point(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggle Fullscreen
|
||||||
|
if (Input::pressed(Key::F4))
|
||||||
|
App::fullscreen(fullscreen = !fullscreen);
|
||||||
|
|
||||||
// Normal Update
|
// Normal Update
|
||||||
if (!m_transition)
|
if (!m_transition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace TL
|
||||||
Batch batch;
|
Batch batch;
|
||||||
Point room;
|
Point room;
|
||||||
Vec2 camera;
|
Vec2 camera;
|
||||||
|
bool fullscreen = false;
|
||||||
|
|
||||||
void load_room(Point cell, bool is_reload = false);
|
void load_room(Point cell, bool is_reload = false);
|
||||||
void startup();
|
void startup();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user