upfste
This commit is contained in:
@@ -36,11 +36,15 @@ namespace NBF
|
||||
App.Inst.SetMouseCurrsor(false);
|
||||
|
||||
InputManager.OnQuickIndexAction += OnQuickIndexAction;
|
||||
InputManager.OnUseTorchAction += OnUseTorchAction;
|
||||
InputManager.OnUseTelescopeAction += OnUseTelescopeAction;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
InputManager.OnQuickIndexAction -= OnQuickIndexAction;
|
||||
InputManager.OnUseTorchAction -= OnUseTorchAction;
|
||||
InputManager.OnUseTelescopeAction -= OnUseTelescopeAction;
|
||||
}
|
||||
|
||||
private void EnableFirstPersonController()
|
||||
@@ -53,6 +57,23 @@ namespace NBF
|
||||
nextShowSlotIndex = index;
|
||||
}
|
||||
|
||||
private void OnUseTorchAction(bool ret)
|
||||
{
|
||||
if (!ret)
|
||||
{
|
||||
_player.Data.openLight = !_player.Data.openLight;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnUseTelescopeAction(bool ret)
|
||||
{
|
||||
if (!ret)
|
||||
{
|
||||
_player.Data.openTelescope = !_player.Data.openTelescope;
|
||||
_player.ToggleTelescope();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var movementAxis = InputManager.GetMovementInput();
|
||||
|
||||
Reference in New Issue
Block a user