【初心者】課題をクリアしていくスレ【講習会】at GAMEDEV【初心者】課題をクリアしていくスレ【講習会】 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト289:名前は開発中のものです。 04/07/08 23:33 UCn/khb4 #include "hspext.as" #const G 10 #const Coeff 10 #const Wall_e 10 #const Floor_e 8 screen 0, 640, 480, 1 dim sin,256 :dim cos,256 repeat 256 :emsin sin.cnt,cnt :emcos cos.cnt,cnt :loop screen 2, 150, 100, 4: title "Config" pos 5, 8: mes "初速:": pos 50, 5: input V, 50, 25: pos 100, 8: mes "m/s" pos 5, 38: mes "角度:": pos 50, 35: input C, 50, 25: pos 100, 38: mes "°" pos 5, 70: objsize 120, 25: button "Start", *main gsel 0 :stop *main if V > 29000 : 29000 if C > 90 : C = 90 C = C * 256 / 360 :Vx = V :Vy = V :Ycnt = 0 :x = 0 :y = 0 repeat redraw 0 :await 1 color 255,255,255 :boxf :color 255,0,0 :pos 0, 460 : mes "■" :color 0,0,255 :line 0, 475, 640, 475 color 0,0,0 :x += Vx * (-cos.C) / 256 :y += Vy * sin.C / 256 - (G * Ycnt) if x / 1000 < 0 :Vx = -Vx * Wall_e / Coeff :x = 0 if x / 1000 > 624 :Vx = -Vx * Wall_e / Coeff :x = 624000 Ycnt++ :if y < 0 :Vy = Vy * Floor_e / Coeff :y = 0 :Ycnt = 0 pos x / 1000, -y / 1000 + 460 : mes "○" :if cnt > 0 & (Vy <= 0) :break redraw 1 :loop :stop 投下 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch