這個遊戲尚未完成。目的只是向您展示您可以在不使用外部圖片的情況下做一些圖形操作。
如果您想開發此遊戲,請提交您的更新。
文件名:htanoid.hta
要求:I 6?
作者:讓·盧克·安托萬(Jean-Luc Antoine)
提交:2002年5月17日
類別:其他
效果圖:
實現代碼:
代碼如下:
<html xmlns:v =“ urn:schemas-microsoft-com:vml” xmlns:t =“ urn:schemas-microsoft-com:time”>
<頭>
<hta:應用程序
applicationName =“ htanoid”
邊框=“厚” | “對話” | “無” | “薄的”
borderstyle =“ normal” | “複雜” | “提高” | “靜態” | “凹陷”
字幕=“是” ContextMenu =“是”
id =“ ohta”警報(ohta.applicationName);
innerborder =“ yes” maximizebutton =“ yes” minimizebutton =“ yes”
avigable =“ no” scroll =“ no” scrollflat =“ no”
選擇=“是” showintaskbar =“ yes” singleInstance =“ no”
sysmenu =“是”版本=“ 0.5”
WindowState =“ normal” | “最大化” | “最小化”>
<腳本語言= vbscript>
選項顯式
const c_screenw = 400
const c_nbx = 12
const c_nby = 10
昏暗的地形(10,12)
Dim Raqx,Raqw,Play,Ballex,Balley
昏暗的dirbx,dirby'Idiendirect balle x,y
Dim Borddroit
borddroit = C_SCREENW-32
sub document_onkeypress()
選擇CASE UCASE(CHR(window.event.keycode))
案例“ P”
msgbox“暫停”
'window.cleartimeout
結束選擇
結束子
sub document_onclick()
play = true
'document.title =“單擊”&window.event.button
結束子
sub document_onmousemove()
raqx = window.event.clientx-raqw'.shiftkey .keycode .ctrlkey .button .altkey
如果raqx <16,則raqx = 16'mur gauche
如果raqx+raqw> borddroit,則raqx = borddroit-raqw
raquette.style.left = raqx
如果不玩,
BALLEX = RAQX+RAQW/2
Balle.Style.Left = Ballex
如果結束
結束子
亞繪圖(n)
昏暗的K,x,y
設置k = document.getElementById(“ raquette”)
y = 0 to c_nby
x = 0到C_NBX
地形(y,x)= 0'nb de couty restant - porter
下一個
下一個
選擇案例n
案例1
'磚
y = 0至5
x = 0到C_NBX
K.Intertadjacenthtml“ before begin”,“ <table style ='位置:絕對; top =”&102+14*y&“; left =”&16+27*x _
&”; width = 25;高度= 10;' bgcolor =“&array(“銀”,“紅”,“黃色”,“藍色”,“洋紅色”,“ lightgreen”)(y)&”> <tr> <tr> <td> </td> </td> </tr> </tr> </table>”
下一個
下一個
結束選擇
隨機化
Balley = 400
dirbx = int(rnd()*3)+1
dirby = 0-(int(rnd()*4)+1)
結束子
sub Init
昏暗的X,Y,K。