Represents the context for an instance of the Flyweight_Class. In this case, the context includes position and velocity. More...
Public Member Functions | |
Flyweight_Context (int offset_x, int image_width, int image_height, double position_x, double position_y, double velocity_x, double velocity_y) | |
Constructor. | |
Public Attributes | |
int | OffsetXToImage |
int | ImageWidth |
int | ImageHeight |
double | Position_X |
double | Position_Y |
double | Velocity_X |
double | Velocity_Y |
Represents the context for an instance of the Flyweight_Class. In this case, the context includes position and velocity.
This context is manipulated outside the Flyweight_Class by the controlling entity (in this case, the exercise in Program.cs). The Flyweight_Class just holds onto the context.
Definition at line 21 of file Flyweight_Class.cs.
|
inline |
Constructor.
offset_x | Offset from left edge of big resource image to the left edge of the image for this context. |
image_width | Width of image for this context. |
image_height | Height of image for this context. |
position_x | X position of the top left corner of the big resource. |
position_y | Y position of the top left corner of the big resource. |
velocity_x | Initial X velocity. |
velocity_y | Initial Y velocity. |
Definition at line 42 of file Flyweight_Class.cs.
References Flyweight_Context.ImageHeight, Flyweight_Context.ImageWidth, Flyweight_Context.OffsetXToImage, Flyweight_Context.Position_X, Flyweight_Context.Position_Y, Flyweight_Context.Velocity_X, and Flyweight_Context.Velocity_Y.
int ImageHeight |
Definition at line 25 of file Flyweight_Class.cs.
Referenced by Flyweight_Context.Flyweight_Context().
int ImageWidth |
Definition at line 24 of file Flyweight_Class.cs.
Referenced by Flyweight_Context.Flyweight_Context().
int OffsetXToImage |
Definition at line 23 of file Flyweight_Class.cs.
Referenced by Flyweight_Exercise._Flyweight_RenderFlyweights(), and Flyweight_Context.Flyweight_Context().
double Position_X |
Definition at line 26 of file Flyweight_Class.cs.
Referenced by Flyweight_Exercise._Flyweight_RenderFlyweights(), and Flyweight_Context.Flyweight_Context().
double Position_Y |
Definition at line 27 of file Flyweight_Class.cs.
Referenced by Flyweight_Exercise._Flyweight_RenderFlyweights(), and Flyweight_Context.Flyweight_Context().
double Velocity_X |
Definition at line 28 of file Flyweight_Class.cs.
Referenced by Flyweight_Exercise._Flyweight_MoveFlyweights(), and Flyweight_Context.Flyweight_Context().
double Velocity_Y |
Definition at line 29 of file Flyweight_Class.cs.
Referenced by Flyweight_Exercise._Flyweight_MoveFlyweights(), and Flyweight_Context.Flyweight_Context().