Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- e.Graphics.TranslateTransform(Chute1Rect.Width / 2 + Chute1Rect.X, Chute1Rect.Height / 2 + Chute1Rect.Y);
- if (increasing) //Chute is rotating out of the way
- {
- e.Graphics.RotateTransform(chuteAngle);
- e.Graphics.TranslateTransform(-1 * (Chute1Rect.Width / 2 + Chute1Rect.X), -1 * (Chute1Rect.Height / 2 + Chute1Rect.Y));
- e.Graphics.DrawImage(ChuteRotating, Chute1Rect);
- //These statements do not seem to be resetting the graphics drawing by the time we do the trains
- e.Graphics.TranslateTransform(Chute1Rect.Width / 2 + Chute1Rect.X, Chute1Rect.Height / 2 + Chute1Rect.Y);
- e.Graphics.RotateTransform(0);
- }
- else //Chute is rotating into load position
- {
- if (chuteAngle == 0) //Chute has rotated into load position
- {
- e.Graphics.TranslateTransform(-1 * (Chute1Rect.Width / 2 + Chute1Rect.X), -1 * (Chute1Rect.Height / 2 + Chute1Rect.Y));
- //Getting here means that the chute can be lifted & lowered because we are rotated down
- if (lifting) //Chute is lifting out of the way
- {
- Chute1SlideRect.Y -= chuteDistance;
- Chute2SlideRect.Y -= chuteDistance;
- e.Graphics.DrawImage(ChuteSlide, Chute1SlideRect);
- e.Graphics.DrawImage(ChuteSlide, Chute2SlideRect);
- }
- else //Chute is lifting into load position
- {
- Chute1SlideRect.Y -= chuteDistance;
- Chute2SlideRect.Y -= chuteDistance;
- e.Graphics.DrawImage(ChuteSlide, Chute1SlideRect);
- e.Graphics.DrawImage(ChuteSlide, Chute2SlideRect);
- }
- e.Graphics.DrawImage(ChuteJoint, Chute1JointRect);
- e.Graphics.DrawImage(ChuteJoint, Chute2JointRect);
- }
- else
- {
- e.Graphics.RotateTransform(chuteAngle);
- e.Graphics.TranslateTransform(-1 * (Chute1Rect.Width / 2 + Chute1Rect.X), -1 * (Chute1Rect.Height / 2 + Chute1Rect.Y));
- e.Graphics.DrawImage(ChuteRotating, Chute1Rect);
- //These statements do not seem to be resetting the graphics drawing by the time we do the trains
- e.Graphics.TranslateTransform(Chute1Rect.Width / 2 + Chute1Rect.X, Chute1Rect.Height / 2 + Chute1Rect.Y);
- e.Graphics.RotateTransform(0);
- }
- }
- //Down below here is where the trains get drawn
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement