[戻る] 最新記事| 前後の記事|

- 以下は、記事NO. 3283 に関する 返信フォーム です -
??? 投稿者 : hiro(FLA1Aac005.hrs.mesh.ad.jp)
- 2003/04/29(Tue) 19:15 No.3283
 


アニメーションをやっているんですけど右へ向いたら右のアニメーションにしたいんですけど今4方向でRPGを作ってるんです・・

これが↓・・・・
extends SpriteChar;

anim=newAnimation();
while(1) {
 if (getkey(39)>0) x+=3; 
   anim.swing($pat_c01_02a+3,$pat_c01_02a+5,15);
 if (getkey(37)>0) x-=3; 
   anim.swing($pat_c01_02a+9,$pat_c01_02a+11,15);
 if (getkey(40)>0) y+=3;
   anim.swing($pat_c01_02a+0,$pat_c01_02a+2,15);
 if (getkey(38)>0) y-=3;
   anim.swing($pat_c01_02a+6,$pat_c01_02a+8,15);
  $map.scrollTo(x-$screenWidth/2,y-$screenHeight/2); // スクロールする
 update();
}

どこを直せばいいんですか??


Re: ??? 投稿者 : でぶちん(ntkyto003225.kyto.nt.isdn.ppp.infoweb.ne.jp)
- 2003/04/30(Wed) 18:03 No.3289
 
anim=newAnimation();
while(1) {
 if (getkey(39)>0) {x+=3;
anim.swing($pat_c01_02a+3,$pat_c01_02a+5,15);
}
 if (getkey(37)>0) {x-=3;
anim.swing($pat_c01_02a+9,$pat_c01_02a+11,15);
}
 if (getkey(40)>0) {y+=3;
anim.swing($pat_c01_02a+0,$pat_c01_02a+2,15);
}
 if (getkey(38)>0) {y-=3;
anim.swing($pat_c01_02a+6,$pat_c01_02a+8,15);
}
  $map.scrollTo(x-$screenWidth/2,y-$screenHeight/2); // スクロールする
 update();
}
だったような気がします
違ってたらスマソ(汗


おなまえ
Eメール
タイトル
メッセージ
推薦記事
添付File
削除キー (自分の記事を削除時に使用。英数字で8文字以内)
文字色