animationselect.java

来自「一款JAVA款的跳棋」· Java 代码 · 共 32 行

JAVA
32
字号
package org.yushang.jumpchess.Interface;


import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.yushang.jumpchess.pkg.Chess;

public class AnimationSelect extends Animation {
	private Drawer drawer;
	private Chess chess;
	private Point point;
	private int BigOffset = 0;
	
	public AnimationSelect(Drawer drawer, Chess chess, Point point) {
		this.drawer = drawer;
		this.chess = chess;
		this.point = new Point(point.x, point.y);
	}
	
	public void Draw(GC gc) {
		drawer.DrawChess(gc, chess.GetColor(), point, BigOffset / 6 - 1);		
	}

	public boolean Run() {
		BigOffset += 1;
		BigOffset %= 18;
		return true;
	}
 
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?