forked from webduinoio/webduino-blockly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbutton-4.html
More file actions
55 lines (50 loc) · 1.34 KB
/
Copy pathbutton-4.html
File metadata and controls
55 lines (50 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template id="head">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title data-translation="title">Webduino Blockly - 點擊按鈕開關玩賽跑小遊戲</title>
<!-- webduino -->
<script src="/lib/webduino-all.min.js"></script>
<script src="/lib/webduino-blockly.js"></script>
<script src="/lib/runtime.min.js"></script>
</template>
<template id="body">
<br>
<span data-translation="beTheFirstToReach">先到</span>
<span id="goal" data-translation="goal">goal</span>
<span data-translation="toWinTheGame">的贏</span>
<br><br>
<span data-translation="NPC">電腦:</span><span id="npcshow">0</span>
<br>
<span data-translation="player">玩家:</span><span id="usershow">0</span>
<br>
<br>
<div id="npc">
<img id="npcimg" src="/media/tutorials/run-cat.gif">
</div>
<div id="user">
<img id="userimg" src="/media/tutorials/run-lion.gif">
</div>
<button id="start" class="go" data-translation="gameStart">比賽開始</button>
</template>
<template id="css">
#start {
font-size: 30px;
display: block;
padding: 10px;
margin: 10px auto;
}
#start.go {
display: none;
}
#npc, #user {
transition: .3s;
}
#npc img {
width: 100px;
transform: scaleX(-1);
}
#user img {
width: 100px;
transform: scaleX(-1);
}
</template>