升级6.4.升级水,升级天气
This commit is contained in:
4
Assets/Samples/Crest/5.4.2/Examples/Scripts/Assembly.cs
Normal file
4
Assets/Samples/Crest/5.4.2/Examples/Scripts/Assembly.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
namespace UnityEngine.InputSystem { }
|
||||
11
Assets/Samples/Crest/5.4.2/Examples/Scripts/Assembly.cs.meta
Normal file
11
Assets/Samples/Crest/5.4.2/Examples/Scripts/Assembly.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 184ba31454eda45c2a894766ab7ba259
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +1,14 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
#if d_Unity_InputSystem && ENABLE_INPUT_SYSTEM
|
||||
#define INPUT_SYSTEM_ENABLED
|
||||
#endif
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
@@ -12,12 +17,6 @@ namespace WaveHarmonic.Crest.Examples
|
||||
#endif
|
||||
sealed class ExamplesController : MonoBehaviour
|
||||
{
|
||||
[@DecoratedField, SerializeField]
|
||||
KeyCode _Previous = KeyCode.Comma;
|
||||
|
||||
[@DecoratedField, SerializeField]
|
||||
KeyCode _Next = KeyCode.Period;
|
||||
|
||||
[SerializeField]
|
||||
List<GameObject> _Prefabs = new();
|
||||
|
||||
@@ -51,11 +50,19 @@ namespace WaveHarmonic.Crest.Examples
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyUp(_Previous))
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
if (Keyboard.current[Key.N].wasReleasedThisFrame)
|
||||
#else
|
||||
if (Input.GetKeyUp(KeyCode.N))
|
||||
#endif
|
||||
{
|
||||
Previous();
|
||||
}
|
||||
else if (Input.GetKeyUp(_Next))
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
else if (Keyboard.current[Key.M].wasReleasedThisFrame)
|
||||
#else
|
||||
else if (Input.GetKeyUp(KeyCode.M))
|
||||
#endif
|
||||
{
|
||||
Next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user