decals
This commit is contained in:
@@ -10,7 +10,20 @@ public class InputResolver
|
||||
public Vector2 MouseDelta => IsDriverActive ? Input.MouseDelta : default;
|
||||
public Vector2 MouseWheel => IsDriverActive ? Input.MouseWheel : default;
|
||||
public Angles AnalogLook => IsDriverActive ? Input.AnalogLook : default;
|
||||
public Vector3 AnalogMove => IsDriverActive ? Input.AnalogMove : default;
|
||||
public Vector3 AnalogMove
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( Input.UsingController )
|
||||
{
|
||||
Vector2 input = 0;
|
||||
input.x = Input.GetAnalog( InputAnalog.RightTrigger ) - Input.GetAnalog( InputAnalog.LeftTrigger );
|
||||
input.y = -Input.GetAnalog( InputAnalog.LeftStickX );
|
||||
return input;
|
||||
}
|
||||
return IsDriverActive ? Input.AnalogMove : default;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Down( string action )
|
||||
{
|
||||
@@ -34,6 +47,13 @@ public class InputResolver
|
||||
Input.TriggerHaptics( leftMotor, rightMotor, leftTrigger, rightTrigger, duration );
|
||||
}
|
||||
}
|
||||
public void TriggerHaptics( HapticEffect effect, float lengthScale = 1, float frequencyScale = 1, float amplitudeScale = 1 )
|
||||
{
|
||||
if ( IsDriverActive )
|
||||
{
|
||||
Input.TriggerHaptics( effect, lengthScale, frequencyScale, amplitudeScale );
|
||||
}
|
||||
}
|
||||
|
||||
public void StopAllHaptics()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user