Fixed some code-issues

This commit is contained in:
DarthAffe committed 2017-01-05 16:37:00 +01:00
1 parent 8523a4ddb3
commit 925e02f146
31 files changed
+223 -16

No files matched your search

+3
View File
@@ -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>
+5
View File
@@ -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;