コメント
このコメントは、【トピック】スプライトへのコメントです。コメントの内容
コメントの内容(一番最初の投稿)
おっ!だんだんわかってきたような…感動…ありがとうございます。
じゃあ、whle外でcreateSpriteしてあとはその画像をwhile内で使えば…
…あれ…?何も表示されん…!?
どうしてでしょう…
じゃあ、whle外でcreateSpriteしてあとはその画像をwhile内で使えば…
#画像スプライト
deleteAllSprite() #最初に使う前にキャンバスをキレイにしておく
drawCanvas()
setCanvasVisible(true)
#準備
x =0
y =0
w =150
h =150
xx=0
yy=0
ww=150
hh=150
img_id_01 = createSprite(84357)
img_id_02 = createSprite(84364)
img_id_03 = createSprite(84371)
img_id_04 = createSprite(84378)
img_id_05 = createSprite(84385)
#アニメーションさせる
i = 0
while i < 4
case i
when 0
setSpriteRect(img_id_01, x,y,w,h, xx,yy,ww,hh)
when 1
setSpriteRect(img_id_02, x,y,w,h, xx,yy,ww,hh)
when 2
setSpriteRect(img_id_03, x,y,w,h, xx,yy,ww,hh)
when 3
setSpriteRect(img_id_04, x,y,w,h, xx,yy,ww,hh)
when 4
setSpriteRect(img_id_05, x,y,w,h, xx,yy,ww,hh)
end
drawCanvas()
i = i + 1
waitTime(100)
end
…あれ…?何も表示されん…!?
どうしてでしょう…
じゃあ、whle外でcreateSpriteしてあとはその画像をwhile内で使えば…
#画像スプライト deleteAllSprite() #最初に使う前にキャンバスをキレイにしておく drawCanvas() setCanvasVisible(true) #準備 x =0 y =0 w =150 h =150 xx=0 yy=0 ww=150 hh=150 img_id_01 = createSprite(84357) img_id_02 = createSprite(84364) img_id_03 = createSprite(84371) img_id_04 = createSprite(84378) img_id_05 = createSprite(84385) #アニメーションさせる i = 0 while i < 4 case i when 0 setSpriteRect(img_id_01, x,y,w,h, xx,yy,ww,hh) when 1 setSpriteRect(img_id_02, x,y,w,h, xx,yy,ww,hh) when 2 setSpriteRect(img_id_03, x,y,w,h, xx,yy,ww,hh) when 3 setSpriteRect(img_id_04, x,y,w,h, xx,yy,ww,hh) when 4 setSpriteRect(img_id_05, x,y,w,h, xx,yy,ww,hh) end drawCanvas() i = i + 1 waitTime(100) end…あれ…?何も表示されん…!?
どうしてでしょう…