还原水插件

This commit is contained in:
2026-03-05 00:14:42 +08:00
parent 0de35591e7
commit e82f2ea6b7
270 changed files with 2773 additions and 12445 deletions

View File

@@ -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();
}