Skip to content

Commit

Permalink
sealing inherited classes on recommendation of unity
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcarriere committed Aug 8, 2016
1 parent e18b181 commit 075d20d
Show file tree
Hide file tree
Showing 31 changed files with 112 additions and 110 deletions.
2 changes: 1 addition & 1 deletion Assets/Plugins/GoKit/GoTween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;


public class GoTween : AbstractGoTween
public sealed class GoTween : AbstractGoTween
{
// Tween specific properties
public object target { get; private set; } // the target of the tweens
Expand Down
2 changes: 1 addition & 1 deletion Assets/Plugins/GoKit/GoTweenChain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;


public class GoTweenChain : AbstractGoTweenCollection
public sealed class GoTweenChain : AbstractGoTweenCollection
{
public GoTweenChain() : this(new GoTweenCollectionConfig()) {}
public GoTweenChain(GoTweenCollectionConfig config) : base(config) {}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Plugins/GoKit/GoTweenFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/// like control by inserting Tweens and setting them to start at a specific time. Note that TweenFlows do not
/// honor the delays set within regular Tweens. Use the append/prependDelay method to add any required delays
/// </summary>
public class GoTweenFlow : AbstractGoTweenCollection
public sealed class GoTweenFlow : AbstractGoTweenCollection
{
public GoTweenFlow() : this( new GoTweenCollectionConfig() ) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections;


public class ColorTweenProperty : AbstractMaterialColorTweenProperty, IGenericProperty
public sealed class ColorTweenProperty : AbstractMaterialColorTweenProperty, IGenericProperty
{
public string propertyName { get; private set; }
private Action<Color> _setter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
using System.Collections;


public class FloatTweenProperty : AbstractTweenProperty, IGenericProperty
public sealed class FloatTweenProperty : AbstractTweenProperty, IGenericProperty
{
public string propertyName { get; private set; }
private Action<float> _setter;

protected float _originalEndValue;
protected float _startValue;
protected float _endValue;
protected float _diffValue;
private float _originalEndValue;
private float _startValue;
private float _endValue;
private float _diffValue;


public FloatTweenProperty( string propertyName, float endValue, bool isRelative = false ) : base( isRelative )
{
Expand Down
12 changes: 6 additions & 6 deletions Assets/Plugins/GoKit/properties/genericTypes/IntTweenProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
using System.Collections;


public class IntTweenProperty : AbstractTweenProperty, IGenericProperty
public sealed class IntTweenProperty : AbstractTweenProperty, IGenericProperty
{
public string propertyName { get; private set; }

private Action<int> _setter;

protected int _originalEndValue;
protected int _startValue;
protected int _endValue;
protected int _diffValue;
private int _originalEndValue;
private int _startValue;
private int _endValue;
private int _diffValue;


public IntTweenProperty( string propertyName, int endValue, bool isRelative = false ) : base( isRelative )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
using System.Collections;


public class Vector2TweenProperty : AbstractTweenProperty, IGenericProperty
public sealed class Vector2TweenProperty : AbstractTweenProperty, IGenericProperty
{
public string propertyName { get; private set; }
private Action<Vector2> _setter;

protected Vector2 _originalEndValue;
protected Vector2 _startValue;
protected Vector2 _endValue;
protected Vector2 _diffValue;
private Vector2 _originalEndValue;
private Vector2 _startValue;
private Vector2 _endValue;
private Vector2 _diffValue;


public Vector2TweenProperty( string propertyName, Vector2 endValue, bool isRelative = false ) : base( isRelative )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections;


public class Vector3PathTweenProperty : AbstractTweenProperty, IGenericProperty
public sealed class Vector3PathTweenProperty : AbstractTweenProperty, IGenericProperty
{
public string propertyName { get; private set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections;


public class Vector3TweenProperty : AbstractVector3TweenProperty, IGenericProperty
public sealed class Vector3TweenProperty : AbstractVector3TweenProperty, IGenericProperty
{
public string propertyName { get; private set; }
private Action<Vector3> _setter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
using System.Collections;


public class Vector4TweenProperty : AbstractTweenProperty, IGenericProperty
public sealed class Vector4TweenProperty : AbstractTweenProperty, IGenericProperty
{
public string propertyName { get; private set; }
private Action<Vector4> _setter;

protected Vector4 _originalEndValue;
protected Vector4 _startValue;
protected Vector4 _endValue;
protected Vector4 _diffValue;
private Vector4 _originalEndValue;
private Vector4 _startValue;
private Vector4 _endValue;
private Vector4 _diffValue;


public Vector4TweenProperty( string propertyName, Vector4 endValue, bool isRelative = false ) : base( isRelative )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections;


public class AnchorMaxTweenProperty : AbstractTweenProperty
public sealed class AnchorMaxTweenProperty : AbstractTweenProperty
{
protected RectTransform _target;
private RectTransform _target;

protected Vector2 _originalEndValue;
protected Vector2 _startValue;
protected Vector2 _endValue;
protected Vector2 _diffValue;
public AnchorMaxTweenProperty( Vector2 endValue, bool isRelative = false) : base( isRelative )
private Vector2 _originalEndValue;
private Vector2 _startValue;
private Vector2 _endValue;
private Vector2 _diffValue;

public AnchorMaxTweenProperty( Vector2 endValue, bool isRelative = false ) : base( isRelative )
{
_originalEndValue = endValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections;


public class AnchorMinTweenProperty : AbstractTweenProperty
public sealed class AnchorMinTweenProperty : AbstractTweenProperty
{
protected RectTransform _target;
private RectTransform _target;

protected Vector2 _originalEndValue;
protected Vector2 _startValue;
protected Vector2 _endValue;
protected Vector2 _diffValue;
public AnchorMinTweenProperty( Vector2 endValue, bool isRelative = false) : base( isRelative )
private Vector2 _originalEndValue;
private Vector2 _startValue;
private Vector2 _endValue;
private Vector2 _diffValue;

public AnchorMinTweenProperty( Vector2 endValue, bool isRelative = false ) : base( isRelative )
{
_originalEndValue = endValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections;


public class AnchoredPosition3DTweenProperty : AbstractTweenProperty
public sealed class AnchoredPosition3DTweenProperty : AbstractTweenProperty
{
protected RectTransform _target;
private RectTransform _target;

protected Vector3 _originalEndValue;
protected Vector3 _startValue;
protected Vector3 _endValue;
protected Vector3 _diffValue;
public AnchoredPosition3DTweenProperty( Vector3 endValue, bool isRelative = false) : base( isRelative )
private Vector3 _originalEndValue;
private Vector3 _startValue;
private Vector3 _endValue;
private Vector3 _diffValue;

public AnchoredPosition3DTweenProperty( Vector3 endValue, bool isRelative = false ) : base( isRelative )
{
_originalEndValue = endValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections;


public class AnchoredPositionTweenProperty : AbstractTweenProperty
public sealed class AnchoredPositionTweenProperty : AbstractTweenProperty
{
protected RectTransform _target;
private RectTransform _target;

protected Vector2 _originalEndValue;
protected Vector2 _startValue;
protected Vector2 _endValue;
protected Vector2 _diffValue;
public AnchoredPositionTweenProperty( Vector2 endValue, bool isRelative = false) : base( isRelative )
private Vector2 _originalEndValue;
private Vector2 _startValue;
private Vector2 _endValue;
private Vector2 _diffValue;

public AnchoredPositionTweenProperty( Vector2 endValue, bool isRelative = false ) : base( isRelative )
{
_originalEndValue = endValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;


public class EulerAnglesTweenProperty : AbstractVector3TweenProperty
public sealed class EulerAnglesTweenProperty : AbstractVector3TweenProperty
{
private bool _useLocalEulers;
public bool useLocalEulers { get { return _useLocalEulers; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;


public class MaterialFloatTweenProperty : AbstractMaterialFloatTweenProperty
public sealed class MaterialFloatTweenProperty : AbstractMaterialFloatTweenProperty
{
private string _materialPropertyName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;


public class MaterialVectorTweenProperty : AbstractMaterialVectorTweenProperty
public sealed class MaterialVectorTweenProperty : AbstractMaterialVectorTweenProperty
{
private string _materialPropertyName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
using System.Collections;


public class OffsetTweenProperty : AbstractTweenProperty
public sealed class OffsetTweenProperty : AbstractTweenProperty
{
protected bool _useMax;
private bool _useMax;

protected RectTransform _target;

protected Vector2 _originalEndValue;
protected Vector2 _startValue;
protected Vector2 _endValue;
protected Vector2 _diffValue;
private RectTransform _target;

private Vector2 _originalEndValue;
private Vector2 _startValue;
private Vector2 _endValue;
private Vector2 _diffValue;

public OffsetTweenProperty( Vector2 endValue, bool isRelative = false, bool useMax = false ) : base( isRelative )
{
_originalEndValue = endValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections;


public class PivotTweenProperty : AbstractTweenProperty
public sealed class PivotTweenProperty : AbstractTweenProperty
{
protected RectTransform _target;
private RectTransform _target;

protected Vector2 _originalEndValue;
protected Vector2 _startValue;
protected Vector2 _endValue;
protected Vector2 _diffValue;
public PivotTweenProperty( Vector2 endValue, bool isRelative = false) : base( isRelative )
private Vector2 _originalEndValue;
private Vector2 _startValue;
private Vector2 _endValue;
private Vector2 _diffValue;

public PivotTweenProperty( Vector2 endValue, bool isRelative = false ) : base( isRelative )
{
_originalEndValue = endValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
/// relative to the start position of the object. a "from" tween will reverse the path and make the start
/// position be the last node in the path.
/// </summary>
public class PositionPathTweenProperty : AbstractTweenProperty
public sealed class PositionPathTweenProperty : AbstractTweenProperty
{
protected bool _useLocalPosition;
private bool _useLocalPosition;

public bool useLocalPosition { get { return _useLocalPosition; } }
protected Transform _target;
protected Vector3 _startValue;

private Transform _target;
private Vector3 _startValue;

private GoSpline _path;
private GoLookAtType _lookAtType = GoLookAtType.None;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
using System.Collections;


public class PositionTweenProperty : AbstractVector3TweenProperty
public sealed class PositionTweenProperty : AbstractVector3TweenProperty
{
protected bool _useLocalPosition;
private bool _useLocalPosition;

public bool useLocalPosition { get { return _useLocalPosition; } }

public PositionTweenProperty( Vector3 endValue, bool isRelative = false, bool useLocalPosition = false ) : base( endValue, isRelative )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;


public class RotationQuaternionTweenProperty : AbstractQuaternionTweenProperty
public sealed class RotationQuaternionTweenProperty : AbstractQuaternionTweenProperty
{
private bool _useLocalRotation;
public bool useLocalRotation { get { return _useLocalRotation; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;


public class RotationTweenProperty : AbstractVector3TweenProperty
public sealed class RotationTweenProperty : AbstractVector3TweenProperty
{
private bool _useLocalRotation;
public bool useLocalRotation { get { return _useLocalRotation; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
/// relative to the start scale of the object. a "from" tween will reverse the path and make the start
/// scale be the last node in the path.
/// </summary>
public class ScalePathTweenProperty : AbstractTweenProperty
public sealed class ScalePathTweenProperty : AbstractTweenProperty
{
protected Transform _target;
protected Vector3 _startValue;
private Transform _target;
private Vector3 _startValue;

private GoSpline _path;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections;


public class ScaleTweenProperty : AbstractVector3TweenProperty
public sealed class ScaleTweenProperty : AbstractVector3TweenProperty
{
public ScaleTweenProperty( Vector3 endValue, bool isRelative = false ) : base( endValue, isRelative )
{}
Expand Down

0 comments on commit 075d20d

Please sign in to comment.