first commit
This commit is contained in:
47
CS1322/p6/MyWay2/CBgLayer.java
Normal file
47
CS1322/p6/MyWay2/CBgLayer.java
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* <PRE>
|
||||
* CBgLayer.java
|
||||
*
|
||||
* Revisions: 1.0 Nov. 24, 2002
|
||||
* Created the CBgLayer class
|
||||
*
|
||||
* </PRE>
|
||||
*
|
||||
* @author <A HREF="mailto:gtg184g@mail.gatech.edu">Jose Manuel Caban</A>
|
||||
* @version Version 1.0, Nov. 24, 2002
|
||||
*/
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class CBgLayer extends JPanel{
|
||||
CEngine cEngine;
|
||||
|
||||
public CBgLayer(String fileName){
|
||||
cEngine = new CEngine(fileName);
|
||||
}
|
||||
|
||||
protected void paintComponent(Graphics g){
|
||||
super.paintComponent(g);
|
||||
int w = WIDTH / cEngine.cBgLayer.length;
|
||||
int h = HEIGHT / cEngine.cBgLayer[0].length;
|
||||
|
||||
for(int x=0; x<cEngine.cBgLayer.length; x++){
|
||||
for(int y=0; y<cEngine.cBgLayer[x].length; y++){
|
||||
if(cEngine.cBgLayer[x][y].getZ() == 2){
|
||||
fillrect(
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Debugging main for class CBgLayer.
|
||||
* This method will rigorously test my code.
|
||||
*
|
||||
* <br><br>
|
||||
* @param args a String array of command line arguments.
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}// end of main(String[] args)
|
||||
|
||||
}// end of class CBgLayer
|
||||
Reference in New Issue
Block a user