6th attempt at Meteos.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
meteo_engine/src/sig/BlockClump.java

26 lines
801 B

package sig;
4 years ago
import java.awt.Graphics;
import java.util.List;
public class BlockClump {
List<Block> blocks;
double x,y; //the lower-left origin of this block clump. Every block positions relative to this.
double yspd;
public BlockClump(List<Block> blockList, double x, double y, double startspd) {
this.blocks = blockList;
this.x=x;
this.y=y;
this.yspd=startspd;
}
@Override
public String toString() {
return "BlockClump [blocks=" + blocks + ", x=" + x + ", y=" + y + ", yspd=" + yspd + "]";
}
4 years ago
public void drawBlocks(Graphics g, int originX, int originY, int block_width, int block_height) {
for (Block b : blocks) {
b.draw(g,originX+x*block_width,originY-y,block_width,block_height);
4 years ago
}
}
}