Add practice range: shooting, AK47, intro cinematic, dressed warehouse scene
- PortalTestDestination practice range: Valorant-style hitscan rifle (recoil, spray/bloom, reload, controller support), debug HUD, practice-dummy targets with head/body hitboxes, hit/death/respawn animations, procedural SFX/FX - AK47 model (Quaternius, CC0) held via Animator IK, with fire/reload/equip anims - Intro cinematic (camera shots, title card, target beam-in, GO hand-off) - Scene dressing editor pass: CC0 textures, props, warehouse roof, lighting and post-processing; custom stylized skybox shader - CharacterMovement: camera recoil, shoulder offset, cinematic control lock - Unity CLI pipeline package; plus in-progress chat/Rive/player changes Asset credits: Assets/Models/Props/PROPS_CREDITS.txt (3 CC-BY 3.0 props), Assets/Textures/Range/TEXTURES_LICENSE.txt, Assets/Resources/*/..._LICENSE.txt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c674d76549
commit
5fc9ebf1e6
@@ -5,8 +5,8 @@ using System.Reflection.Metadata;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
/// Sends keyboard navigation commands to the Rive menu and
|
||||
/// activates the Play option when Enter is pressed
|
||||
/// Sends keyboard and gamepad navigation commands to the Rive menu and
|
||||
/// activates the Play option when Enter/gamepad confirm is pressed
|
||||
public class RiveNavigationController : MonoBehaviour
|
||||
{
|
||||
[Header("Rive")]
|
||||
@@ -83,25 +83,42 @@ public class RiveNavigationController : MonoBehaviour
|
||||
private void Update()
|
||||
{
|
||||
Keyboard keyboard = Keyboard.current;
|
||||
Gamepad gamepad = Gamepad.current;
|
||||
|
||||
if (keyboard == null)
|
||||
return;
|
||||
bool movedRight = false;
|
||||
bool movedLeft = false;
|
||||
bool confirmPressed = false;
|
||||
|
||||
if (keyboard.rightArrowKey.wasPressedThisFrame)
|
||||
if (keyboard != null)
|
||||
{
|
||||
movedRight |= keyboard.rightArrowKey.wasPressedThisFrame;
|
||||
movedLeft |= keyboard.leftArrowKey.wasPressedThisFrame;
|
||||
confirmPressed |= keyboard.enterKey.wasPressedThisFrame || keyboard.numpadEnterKey.wasPressedThisFrame;
|
||||
}
|
||||
|
||||
if (gamepad != null)
|
||||
{
|
||||
// D-pad and left stick both move the selection — leftStick.left/right are the
|
||||
// Input System's built-in synthetic buttons derived from the stick's deflection,
|
||||
// so this fires once per push just like a button, not continuously while held.
|
||||
movedRight |= gamepad.dpad.right.wasPressedThisFrame || gamepad.leftStick.right.wasPressedThisFrame;
|
||||
movedLeft |= gamepad.dpad.left.wasPressedThisFrame || gamepad.leftStick.left.wasPressedThisFrame;
|
||||
confirmPressed |= gamepad.buttonSouth.wasPressedThisFrame;
|
||||
}
|
||||
|
||||
if (movedRight)
|
||||
{
|
||||
MoveSelection(+1);
|
||||
nextTrigger?.Trigger();
|
||||
}
|
||||
|
||||
if (keyboard.leftArrowKey.wasPressedThisFrame)
|
||||
if (movedLeft)
|
||||
{
|
||||
MoveSelection(-1);
|
||||
previousTrigger?.Trigger();
|
||||
}
|
||||
|
||||
bool enterPressed = keyboard.enterKey.wasPressedThisFrame || keyboard.numpadEnterKey.wasPressedThisFrame;
|
||||
|
||||
if (enterPressed && selectedIndex == PlayIndex)
|
||||
if (confirmPressed && selectedIndex == PlayIndex)
|
||||
{
|
||||
if (sceneTransitionController == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user