今回悩んでいるのはショット時にキャラの画像が入れ替わらず、
通常時のままになってしまっていることです。
void Drawshot(int key){
//発射処理
if (IsBKeyTrigger(key) == 1){
//空きを探す
int i;
for (i = 0; i < MAX_SHOT; i++){
if (g_stagedata.shots[i].living == FALSE) break;
}
if (i < MAX_SHOT){
g_stagedata.shots[i].living = TRUE;
if(g_stagedata.hero.turn==FALSE){ //操作キャラの手(手前)からショットを出す
g_stagedata.shots[i].x = g_stagedata.hero.x + IMG_CHIPSIZE;
g_stagedata.shots[i].turn = FALSE;
}
else{
g_stagedata.shots[i].x = g_stagedata.hero.x - IMG_CHIPSIZE;
g_stagedata.shots[i].turn = TRUE;
}
g_stagedata.shots[i].y = g_stagedata.hero.y;
}
//弾を撃ったフラグ
g_stagedata.hero.shoting = 1;
}
}
//ショット時
if (g_stagedata.hero.shoting == 1) {
g_stagedata.hero.shotstop = 100;
while(1){
if(g_stagedata.hero.shotstop ==0){
// 硬直時間の終わり
g_stagedata.hero.shoting = 0;
break;
}
g_stagedata.hero.shotstop -= 1;
}
}
if(g_stagedata.hero.shoting == 0 && g_stagedata.hero.lifedown == 0){
if(g_stagedata.hero.muteki%5==0 && g_stagedata.hero.jumping == FALSE && walk == 0){
DrawRotaGraph2((int)(g_stagedata.hero.x - g_stagedata.scrollx),
(int)g_stagedata.hero.y, 0, 0, 1, 0,
g_imghandles.hero[0], FALSE, g_stagedata.hero.turn);
}
else if (g_stagedata.hero.shoting ==1 && g_stagedata.hero.lifedown == 0){
if(g_stagedata.hero.muteki%5==0 && g_stagedata.hero.jumping == FALSE && walk == 0){
DrawRotaGraph2((int)(g_stagedata.hero.x - g_stagedata.scrollx),
(int)g_stagedata.hero.y, 0, 0, 1, 0,
g_imghandles.hero[4], FALSE, g_stagedata.hero.turn);
}
}
g_stagedata.hero.shotstop = 100;が機能していないようです。
申し訳ありませんが、訂正をよろしくお願いします。