Skip to content

Commit 879ea4d

Browse files
committed
block movement of player when console is down
1 parent 07a96f2 commit 879ea4d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Assets/DebugOverlay/Console.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public Console()
4646
Keyboard.current.onTextInput += OnTextInput;
4747
}
4848

49+
public bool IsOpen()
50+
{
51+
return m_ConsoleOpen;
52+
}
53+
4954
private void CmdDumpScene(string[] args)
5055
{
5156
var go = new List<GameObject>();

Assets/Demo/fpscontroller.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ void Start()
3737

3838
void Update()
3939
{
40+
if(Game.console.IsOpen())
41+
return;
42+
4043
// Turn player
4144
var turn_player = new Vector3(0, Mouse.current.delta.x.value, 0);
4245

0 commit comments

Comments
 (0)