?? gameviewer.java
字號:
/*
Netwar
Copyright (C) 2002 Daniel Grund, Kyle Kakligian, Jason Komutrattananon, & Brian Hibler.
This file is part of Netwar.
Netwar is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Netwar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Netwar; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package netwar.game;
import java.awt.Color;
import java.awt.Image;
import netwar.utils.vectorgraphics.Point3D;
/** Interface for an object capable of displaying the contents of a game,
* which are instances of Hex, GameObject and Projectile.
* @author Group N2 - Project Netwar
* @author Daniel Grund
*/
public interface GameViewer {
/** This method sets the color for subsequent calls to drawLine and drawTriangle.
* @param c The color which subsequent render calls will be drawn in.
*/
public void setColor(Color c);
/** This method draws a line segment on the GameViewer's display.
* The line segment is drawn from the pixel containing v1 to the pixel containing v2.
* @param v1 One end of the line in game-space
* @param v2 The other end of the line in game-space
*/
public void drawLine(Point3D v1, Point3D v2);
/** This method draws a filled triangle on the GameViewer's display.
* The vertices are the pixels containing v1, v2, and v3.
* @param v1 One vertice in game-space.
* @param v2 A second vertice in game-space.
* @param v3 The third vertice in game-space.
*/
public void drawTriangle(Point3D v1, Point3D v2, Point3D v3);
/** This method draws an image on the GameViewer's display.
* @param vr The point in game-space located at the center of where the image should appear.
* @param img The Image to display.
*/
public void drawImage(Point3D vr, Image img);
/** This method returns the Transform which defines the game-space to screen-space conversion.
* This is used for both Z-Ordering and XY box checking.
*/
public netwar.utils.vectorgraphics.Transform getTransform();
/** This method adds a GraphicThing into the list used by this GameViewer */
public void add(netwar.utils.vectorgraphics.GraphicThing thing);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -