var showAtari=true; if(showAtari){ for(i=0;i<2;i++){//くらい判定 document.writeln("
body
"); } for(i=0;i<2;i++){//攻撃判定 document.writeln("
attack
"); } } function ShowAtariHantei(p1,p2){ if(showAtari==false){ return; } Move_Bitmap_HanteiBody(p1,document.getElementById("han_b0")); Move_Bitmap_HanteiBody(p2,document.getElementById("han_b1")); Move_Bitmap_HanteiAttack(p1,document.getElementById("han_a0")); Move_Bitmap_HanteiAttack(p2,document.getElementById("han_a1")); } function Move_Bitmap_HanteiBody(obj,target){//ビットマップ移動 target.style.left=obj.core_x; target.style.top=obj.core_y; target.style.width=obj.core_wid; target.style.height=obj.core_hei; target.innerHTML=obj.life; } function Move_Bitmap_HanteiAttack(obj,target){//ビットマップ移動 target.style.left=obj.at_x; target.style.top=obj.at_y; target.style.width=obj.at_w; target.style.height=obj.at_h; if(obj.imp>0){ target.style.backgroundColor="rgba(255,0,0,0.5)"; }else{ target.style.backgroundColor="rgba(255,255,0,0.5)"; } target.innerHTML=obj.at_p; }