升级水插件

This commit is contained in:
2026-01-08 22:30:55 +08:00
parent febff82d24
commit ca68084264
415 changed files with 18138 additions and 7134 deletions

View File

@@ -1,4 +1,4 @@
// Crest Water System
// Crest Water System
// Copyright © 2024 Wave Harmonic. All rights reserved.
using System;
@@ -51,6 +51,12 @@ namespace WaveHarmonic.Crest
_Member = _Type.GetMember(member, Helpers.s_AnyMethod)[0];
}
/// <inheritdoc cref="Predicated(Type, string, object, bool, bool)"/>
public Predicated(Type type, string member, bool inverted = false, bool hide = false) : this(type, member, true, inverted, hide)
{
}
/// <summary>
/// Enable/Disable field depending on the current type of the component.
/// </summary>
@@ -165,11 +171,11 @@ namespace WaveHarmonic.Crest
if (_Member is PropertyInfo autoProperty)
{
// == operator does not work.
enabled = autoProperty.GetValue(@object).Equals(_DisableValue);
enabled = !autoProperty.GetValue(@object).Equals(_DisableValue);
}
else if (_Member is MethodInfo method)
{
enabled = method.Invoke(@object, new object[] { }).Equals(_DisableValue);
enabled = !method.Invoke(@object, new object[] { }).Equals(_DisableValue);
}
if (_Inverted) enabled = !enabled;