2026.11.16 phaser  
 2026.11.16 phaser  
 2025.01.05 phaser  
 2024.12.22 phaser  
 2024.12.22 phaser  

Bunker


 this.bunkerGroup = this.physics.add.staticGroup().setDepth(1);
 const bunkerLocations = [150, 400, 650];
 bunkerLocations.forEach(x => {
   this.createBunker(x, 400);
});
 createBunker( x: number, y: number) {
 // バンカーの形をビットマップ形式の配列で定義 (1がブロック、0が空白)
const layout = [
   [0, 0, 1, 1, 1, 1, 1, 1, 0, 0],
   [0, 1, 1, 1, 1, 1, 1, 1, 1, 0],
   [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
   [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
   [1, 1, 1, 0, 0, 0, 0, 1, 1, 1],
   [1, 1, 0, 0, 0, 0, 0, 0, 1, 1]
 ];
 const blockSize = 8; // 1つのブロックのサイズ(px)
 const color = 0x20ff20; // インベーダー風の緑色
 //   this.bunkerGroup = this.physics.add.staticGroup();
layout.forEach((row, rowIndex) => {
  row.forEach((value, colIndex) => {
    if (value === 1) {
// 各ドットを矩形(Rectangle)として作成
    const block = this.add.rectangle(
    x + colIndex * blockSize,
    y + rowIndex * blockSize,
    blockSize,
    blockSize,
    color
   );
   // 物理ボディを有効化
     this.bunkerGroup.add(block);
    }
    });
});
 return this.bunkerGroup;
 }

single-page-site

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

singletest-site

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest

bbtest