class MainBlock { //属性 PImage block; float blockX,blockY; //コンストラクタ MainBlock( float ztate, float zyoko ){ imageMode(CORNER); block = loadImage("MainBlock.png"); blockX = zyoko; blockY = zyoko; } void update() { for( blockY = 0 ; blockY < 4 ; blockY++ ){ for( blockX = 0 ; blockX < 4 ; blockX++ ){ if( zukeidt[blockY][blockX] == 1 ){ image(block, blockX, blockY); } } } } }