This commit is contained in:
2025-11-20 12:06:42 +08:00
parent 388fbe743e
commit 7936419eec
566 changed files with 130934 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a04cf6ca22a95684e9283ab039f68c66
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,46 @@
using UnityEngine;
namespace Cinemachine.Examples
{
public class ActivateOnKeypress : MonoBehaviour
{
public KeyCode ActivationKey = KeyCode.LeftControl;
public int PriorityBoostAmount = 10;
public GameObject Reticle;
Cinemachine.CinemachineVirtualCameraBase vcam;
bool boosted = false;
void Start()
{
vcam = GetComponent<Cinemachine.CinemachineVirtualCameraBase>();
}
void Update()
{
#if ENABLE_LEGACY_INPUT_MANAGER
if (vcam != null)
{
if (Input.GetKey(ActivationKey))
{
if (!boosted)
{
vcam.Priority += PriorityBoostAmount;
boosted = true;
}
}
else if (boosted)
{
vcam.Priority -= PriorityBoostAmount;
boosted = false;
}
}
if (Reticle != null)
Reticle.SetActive(boosted);
#else
InputSystemHelper.EnableBackendsWarningMessage();
#endif
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e8fce4bd108661c4d9740aea3bc971ed
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: