还原水插件
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
// 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
|
||||
{
|
||||
@@ -17,6 +12,12 @@ 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();
|
||||
|
||||
@@ -50,19 +51,11 @@ namespace WaveHarmonic.Crest.Examples
|
||||
|
||||
void Update()
|
||||
{
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
if (Keyboard.current[Key.N].wasReleasedThisFrame)
|
||||
#else
|
||||
if (Input.GetKeyUp(KeyCode.N))
|
||||
#endif
|
||||
if (Input.GetKeyUp(_Previous))
|
||||
{
|
||||
Previous();
|
||||
}
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
else if (Keyboard.current[Key.M].wasReleasedThisFrame)
|
||||
#else
|
||||
else if (Input.GetKeyUp(KeyCode.M))
|
||||
#endif
|
||||
else if (Input.GetKeyUp(_Next))
|
||||
{
|
||||
Next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user