mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 04:56:44 +00:00
Fixed some code-issues
This commit is contained in:
1 parent
8523a4ddb3
commit
925e02f146
31 files changed
+223
-16
No files matched your search
@@ -76,6 +76,7 @@ namespace CUE.NET.Effects
|
||||
_currentPhaseValue -= deltaTime;
|
||||
|
||||
// Using ifs instead of a switch allows to skip phases with time 0.
|
||||
// ReSharper disable InvertIf
|
||||
|
||||
if (_currentPhase == ADSRPhase.Attack)
|
||||
if (_currentPhaseValue > 0f)
|
||||
@@ -123,6 +124,8 @@ namespace CUE.NET.Effects
|
||||
_currentPhaseValue = Attack;
|
||||
_currentPhase = ADSRPhase.Attack;
|
||||
}
|
||||
|
||||
// ReSharper restore InvertIf
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,8 @@ namespace CUE.NET.Effects
|
||||
public class MoveGradientEffect : AbstractBrushEffect<IGradientBrush>
|
||||
{
|
||||
#region Properties & Fields
|
||||
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the direction the gradient is moved.
|
||||
@@ -24,6 +26,8 @@ namespace CUE.NET.Effects
|
||||
/// </summary>
|
||||
public float Speed { get; set; }
|
||||
|
||||
// ReSharper restore MemberCanBePrivate.Global
|
||||
// ReSharper restore AutoPropertyCanBeMadeGetOnly.Global
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
@@ -53,6 +57,7 @@ namespace CUE.NET.Effects
|
||||
if (!Direction)
|
||||
movement = -movement;
|
||||
|
||||
// ReSharper disable once CanBeReplacedWithTryCastAndCheckForNull
|
||||
if (Brush.Gradient is LinearGradient)
|
||||
{
|
||||
LinearGradient linearGradient = (LinearGradient)Brush.Gradient;
|
||||
|
||||
Reference in new issue
Block a user