Изменил размер шрифтов, переписал скрипт инактива
This commit is contained in:
Binary file not shown.
@ -1,5 +1,6 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
|
using UnityEngine.InputSystem.Controls;
|
||||||
|
|
||||||
public class TimerOnInactiveScript : MonoBehaviour
|
public class TimerOnInactiveScript : MonoBehaviour
|
||||||
{
|
{
|
||||||
@ -28,23 +29,37 @@ public class TimerOnInactiveScript : MonoBehaviour
|
|||||||
MoveCameraToRound();
|
MoveCameraToRound();
|
||||||
}
|
}
|
||||||
|
|
||||||
InputSystem.onActionChange += (obj, change) =>
|
///
|
||||||
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
foreach (var control in Gamepad.current.allControls)
|
||||||
{
|
{
|
||||||
if (change == InputActionChange.ActionPerformed)
|
if (control is ButtonControl button && button.wasPressedThisFrame)
|
||||||
{
|
{
|
||||||
ResetTimer();
|
ResetTimer();
|
||||||
MoveCameraFromRound();
|
MoveCameraFromRound();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
//ResetTimer();
|
if (control is AxisControl axis)
|
||||||
//MoveCameraFromRound();
|
{
|
||||||
//if (Gamepad.current.)
|
float value = axis.ReadValue();
|
||||||
//{
|
if (Mathf.Abs(value) > 0.1f) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
// //Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
{
|
||||||
// ResetTimer();
|
ResetTimer();
|
||||||
// MoveCameraFromRound();
|
MoveCameraFromRound();
|
||||||
//}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Keyboard.current.wasUpdatedThisFrame)
|
||||||
|
{
|
||||||
|
ResetTimer();
|
||||||
|
MoveCameraFromRound();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveCameraToRound()
|
void MoveCameraToRound()
|
||||||
|
Reference in New Issue
Block a user