コード例 #1
0
ファイル: Cycle.cs プロジェクト: DONGChuan/LGame
		private  void Step(GLEx g, Progress e, int index, int frame,
				LColor color, float alpha) {
			switch (stepType) {
			case 0:
				g.FillOval(X() + e.x - blockHalfWidth, Y() + e.y - blockHalfHeight,
						blockWidth, blockHeight);
				break;
			case 1:
				g.FillRect(X() + e.x - blockHalfWidth, Y() + e.y - blockHalfHeight,
						blockWidth, blockHeight);
				break;
			case 2:
				if (last != null) {
					float[] xs = { X() + last.x, X() + e.x };
					float[] ys = { Y() + last.y, Y() + e.y };
					g.DrawPolygon(xs, ys, 2);
				}
				last = e;
				break;
			case 3:
				if (last != null) {
					g.DrawLine(X() + last.x, Y() + last.y, X() + e.x, Y() + e.y);
				}
				last = e;
				break;
			case 4:
				Step(g, e.x, e.y, e.progress, index, frame, color, alpha);
				break;
			}
		}