Skip to content

Commit 6b7932a

Browse files
committed
Merge branch 'release/0.0.5'
* release/0.0.5: build settings disable input on initial tutorial
2 parents be3c24a + e66275f commit 6b7932a

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
# Define required raylib variables
2727
PROJECT_NAME ?= ProjectLight
28-
RAYLIB_VERSION ?= 0.0.4
28+
RAYLIB_VERSION ?= 0.0.5
2929
RAYLIB_PATH ?= C:/raylib/raylib
3030

3131
# Define compiler path on Windows

src/Entities/Player.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ void Player::Input()
4343
return;
4444
}
4545

46+
if (!InputIsEnabled)
47+
return;
48+
4649
if (IsKeyDown(KEY_A))
4750
Direction.x = -1;
4851
if (IsKeyDown(KEY_D))

src/Entities/Player.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class Player : public SpriteAnimation, public CollisionCharacter, public IResetS
4646
PlayerFlashLight *FlashLight;
4747
Backpack *PlayerBackpack;
4848

49+
bool InputIsEnabled{false};
50+
4951
float LineTargetLength{50.0f};
5052

5153
virtual void Start() override;

src/UI/UI_InputTutorial.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "UI_InputTutorial.h"
22
#include "../Window.h"
3+
#include "../Scene/Scene.h"
34

45
void UI_InputTutorial::Start()
56
{
@@ -37,7 +38,10 @@ void UI_InputTutorial::Update(float dt)
3738
mouseAnimation->Update(dt);
3839

3940
if (_timeShowingMouseAnimation <= 0)
41+
{
42+
GetScene()->GetPlayer()->InputIsEnabled = true;
4043
Hide();
44+
}
4145
}
4246

4347
void UI_InputTutorial::Draw()

0 commit comments

Comments
 (0)