-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAdjustment.cs
201 lines (176 loc) · 5.54 KB
/
Adjustment.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#region using statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataJuggler.Blazor.Components.Enumerations;
#endregion
namespace DataJuggler.Blazor.Components
{
#region class Adjustment
/// <summary>
/// This class is used to make adjustments to Sprites.
/// Transform classes can hold many adjustments.
/// A Sprite can have many Transforms.
/// </summary>
public class Adjustment
{
#region Private Variables
private AdjustmentTypeEnum adjustmentType;
private double min;
private double max;
private double adjustmentAmount;
private bool endOnMin;
private bool endOnMax;
private int startTick;
private int endTick;
private bool completed;
private Transform parent;
#endregion
#region Constructor
/// <summary>
/// Create a new instance of a 'Adjustment' object.
/// </summary>
public Adjustment(Transform parent)
{
// store
Parent = parent;
}
#endregion
#region Properties
#region AdjustmentAmount
/// <summary>
/// This property gets or sets the value for 'AdjustmentAmount'.
/// </summary>
public double AdjustmentAmount
{
get { return adjustmentAmount; }
set { adjustmentAmount = value; }
}
#endregion
#region AdjustmentType
/// <summary>
/// This property gets or sets the value for 'AdjustmentType'.
/// </summary>
public AdjustmentTypeEnum AdjustmentType
{
get { return adjustmentType; }
set { adjustmentType = value; }
}
#endregion
#region Completed
/// <summary>
/// This property gets or sets the value for 'Completed'.
/// </summary>
public bool Completed
{
get { return completed; }
set { completed = value; }
}
#endregion
#region EndOnMax
/// <summary>
/// This property gets or sets the value for 'EndOnMax'.
/// </summary>
public bool EndOnMax
{
get { return endOnMax; }
set { endOnMax = value; }
}
#endregion
#region EndOnMin
/// <summary>
/// This property gets or sets the value for 'EndOnMin'.
/// </summary>
public bool EndOnMin
{
get { return endOnMin; }
set { endOnMin = value; }
}
#endregion
#region EndTick
/// <summary>
/// This property gets or sets the value for 'EndTick'.
/// </summary>
public int EndTick
{
get { return endTick; }
set { endTick = value; }
}
#endregion
#region HasParent
/// <summary>
/// This property returns true if this object has a 'Parent'.
/// </summary>
public bool HasParent
{
get
{
// initial value
bool hasParent = (this.Parent != null);
// return value
return hasParent;
}
}
#endregion
#region IsIncrement
/// <summary>
/// This read only property returns true if the AdjustmentAmount is a positive number
/// </summary>
public bool IsIncrement
{
get
{
// initial value
bool isIncrement = (AdjustmentAmount > 0);
// return value
return isIncrement;
}
}
#endregion
#region Max
/// <summary>
/// This property gets or sets the value for 'Max'.
/// </summary>
public double Max
{
get { return max; }
set { max = value; }
}
#endregion
#region Min
/// <summary>
/// This property gets or sets the value for 'Min'.
/// </summary>
public double Min
{
get { return min; }
set { min = value; }
}
#endregion
#region Parent
/// <summary>
/// This property gets or sets the value for 'Parent'.
/// </summary>
public Transform Parent
{
get { return parent; }
set { parent = value; }
}
#endregion
#region StartTick
/// <summary>
/// This property gets or sets the value for 'StartTick'.
/// </summary>
public int StartTick
{
get { return startTick; }
set { startTick = value; }
}
#endregion
#endregion
}
#endregion
}