Изменил размер шрифтов, переписал скрипт инактива
This commit is contained in:
parent
8b71a920ae
commit
95532a1839
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Controls;
|
||||
|
||||
public class TimerOnInactiveScript : MonoBehaviour
|
||||
{
|
||||
@ -28,23 +29,37 @@ public class TimerOnInactiveScript : MonoBehaviour
|
||||
MoveCameraToRound();
|
||||
}
|
||||
|
||||
InputSystem.onActionChange += (obj, change) =>
|
||||
///
|
||||
/// Îòñëåæèâàíèå âçàèìîäåéñòâèÿ ââîäà-âûâîäà
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------
|
||||
|
||||
foreach (var control in Gamepad.current.allControls)
|
||||
{
|
||||
if (change == InputActionChange.ActionPerformed)
|
||||
if (control is ButtonControl button && button.wasPressedThisFrame)
|
||||
{
|
||||
ResetTimer();
|
||||
MoveCameraFromRound();
|
||||
}
|
||||
};
|
||||
|
||||
//ResetTimer();
|
||||
//MoveCameraFromRound();
|
||||
//if (Gamepad.current.)
|
||||
//{
|
||||
// //Debug.Log("êíîïêà íàæàòà");
|
||||
// ResetTimer();
|
||||
// MoveCameraFromRound();
|
||||
//}
|
||||
if (control is AxisControl axis)
|
||||
{
|
||||
float value = axis.ReadValue();
|
||||
if (Mathf.Abs(value) > 0.1f) // Èãíîðèðóåì ìàëûå èçìåíåíèÿ
|
||||
{
|
||||
ResetTimer();
|
||||
MoveCameraFromRound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Keyboard.current.wasUpdatedThisFrame)
|
||||
{
|
||||
ResetTimer();
|
||||
MoveCameraFromRound();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
void MoveCameraToRound()
|
||||
|
Loading…
x
Reference in New Issue
Block a user