Skip to content

Commit

Permalink
WIP: setting the things to merge well
Browse files Browse the repository at this point in the history
  • Loading branch information
Telojuriol committed Apr 11, 2018
1 parent d6c8708 commit 97f7f55
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Bin/data/boot.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"data/scenes/milestone1_map_meshes.scene",
"data/scenes/milestone1_map_colliders.scene",
"data/scenes/enemy.scene",
"data/scenes/camera.scene",
"data/scenes/camera.scene",
"data/scenes/capsules.scene",
"data/scenes/bt_test.scene",
"data/scenes/skeleton_demo.scene"
],
Expand Down
2 changes: 1 addition & 1 deletion Bin/data/gamestates.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"startup" : "map_intro",
"startup" : "main_menu",
"gamestates" :
[
{
Expand Down
8 changes: 4 additions & 4 deletions Bin/data/scenes/camera.scene
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"entity": {
"name": "main_camera",
"transform": {
"pos": "90 160 095",
"lookat" : "-135 -30 0"
"pos": "0 0 0",
"lookat" : "0 0 0"
},
"camera" : {
"fov" : 80
Expand Down Expand Up @@ -104,8 +104,8 @@
"entity": {
"name": "test_camera_flyover",
"transform": {
"pos": "90 160 095",
"lookat" : "-135 -30 0"
"pos": "5 5 0",
"lookat" : "0 0 0"
},
"camera_flyover" : {},
"camera" : {
Expand Down
10 changes: 2 additions & 8 deletions source/modules/game/module_map_intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ bool CModuleMapIntro::start()
cb_object.activate();
cb_camera.activate();

CHandle h_camera = getEntityByName("test_camera_flyover");
CHandle h_camera = getEntityByName("TPCamera");
if (h_camera.isValid())
Engine.getCameras().setDefaultCamera(h_camera);

h_camera = getEntityByName("test_camera_flyover");
h_camera = getEntityByName("main_camera");
if (h_camera.isValid())
Engine.getCameras().setOutputCamera(h_camera);

Expand Down Expand Up @@ -89,12 +89,6 @@ void CModuleMapIntro::update(float delta)
ImGui::DragFloat3("Pos", &world_pos.x, 0.025f, -50.f, 50.f);
VEC2 mouse = EngineInput.mouse()._position;

if (EngineInput.mouse().button(Input::EMouseButton::MOUSE_MIDDLE).getsPressed()) {
Input::CMouse* cMouse = static_cast<Input::CMouse*>(EngineInput.getDevice("mouse"));
cMouse->setLockMouse(false);
ShowCursor(!cMouse->isMouseLocked());
}

if (h_e_camera.isValid()) {
CEntity* e_camera = h_e_camera;
TCompCamera* c_camera = e_camera->get< TCompCamera >();
Expand Down

0 comments on commit 97f7f55

Please sign in to comment.