From f3529b01b3577ff876d45df698567ff33fa25651 Mon Sep 17 00:00:00 2001 From: camouflaged-penguin <82024665+camouflaged-penguin@users.noreply.github.com> Date: Wed, 14 Apr 2021 20:04:13 +0200 Subject: [PATCH] Add files via upload --- assets/bomb.png | Bin 0 -> 495 bytes assets/dude.png | Bin 0 -> 3226 bytes assets/platform.png | Bin 0 -> 14973 bytes assets/sky.png | Bin 0 -> 4757 bytes assets/star.png | Bin 0 -> 443 bytes game.html | 303 ++++++++++++++++++++++++++++++++++++++++++++ img.html | 68 ++++++++++ index.html | 66 ++++++++++ script.js | 24 ++++ styles.css | 95 ++++++++++++++ 10 files changed, 556 insertions(+) create mode 100644 assets/bomb.png create mode 100644 assets/dude.png create mode 100644 assets/platform.png create mode 100644 assets/sky.png create mode 100644 assets/star.png create mode 100644 game.html create mode 100644 img.html create mode 100644 index.html create mode 100644 script.js create mode 100644 styles.css diff --git a/assets/bomb.png b/assets/bomb.png new file mode 100644 index 0000000000000000000000000000000000000000..28a0fbbddc37fd0a6872bbd170cbebdc81e7f597 GIT binary patch literal 495 zcmVD9zu&P4K|6B zy7WV^1|cFcwUDgo`40q5)!rZ!88jJG&>Yy7O9dHWfrAKYlfEe&qJ}`MAqe92ozK39 zS_dxgd-vXR&i(Ftnq^t&M>3hT+O;=%9-bIMHk;M@do)E{^oM&C)=pCLdAgpm1t@k^ z&r6X3MPj2!!s{M{XCa99#+?kFnRB&TFg9jv16`>Rxk3?>iIDADs(<1rvnS76(J0O{ z4|cC4a)kT+9ejBMnD!6B>6=4hHUy^-Qee%C3e4ZT>s*8?kVKHAo}40oaVcvh1b}8) zE^mNtY7q*#E+;~g#Mt4LCAkN3w3u(+;sP9IrN^}&ydV3Br<*c#UiSDfjm=0zDsnt7 zf+7kOV_$ZQdrc~pF>+2ToQvR#`0N42G7i^ lJ{9OsC=n&_ABpiJzyJ*&>ep5+m(>6O002ovPDHLkV1k0g(4+tW literal 0 HcmV?d00001 diff --git a/assets/dude.png b/assets/dude.png new file m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al 0 HcmV?d00001 diff --git a/assets/sky.png b/assets/sky.png new file mode 100644 index 0000000000000000000000000000000000000000..5972639f229c7362edac856b42b86b93811ef3f2 GIT binary patch literal 4757 zcmeH}cTki`8pazzhMXjd=pYD)#ND={olOQPR@b>oBE%)m75B|BT{i?dU>UrPpexG0W*VWNyO!OG(4$}bu z81)g_<^WJa0XTr7q1;o7^Sohu9jzzA`WgWAhrTxokp6%h06J3_IQ+~RXAd8bYt9~? zP<=QY>gny_qwIyzLmEtyf2v9XxD9A;t+cjyKnQ~Zx&!yZT7Y1En#p4r@?l3=--k6fG>uP5Xok=UdIA=jip%`hwgo7_MzE^tspCY*D?s7b zLr(*U##o}%k;q-*wBc3 zL9DDKj*5`_} zXQPu9PZ%7Wo|+mkXn@(+wOIx2pzAIXt+uax4OZP+Uwi**LNG+;LWmyK#{0TAt47&J zI`7fmwjcfwr?*u}zq`fPbG$*{o`4c%pEP6hiq%fPyCRc)JQ{ZIWaEkM-OCeWVw;re zWAdQXRh=R*K|Jq*1LYS(VHT7Rabg{SD80WC@PT$=njcvWm69D6+f6ohm zi`s$`$hHcNW*PvrGebm6wRl%+xy6XoM`{la*V1pL~SMCY4XVt&730=J((oxEMG9Gc`|>qqsgchsScr~(rTeOWXC@gMPYvjB@j!) zl@`9iUyGn(ixGsjMzNb6H%yR6NSoh5LM;(|%WB>Slp@dTzD!VQ0WzUm5!HIq_e09f z)ZQ^XhZFJ?58u{(ME~}(k92w*XD0To_p`%lcNMZ`-WEDD55=j&o27^!xgoL*SEMAG z>S1N4#b^^9+RKg?F%&i(E`z~^09J=!vcw|LzmskAxihfpr=~Gr*KpCQ?gUMQ~b*|bU1rWuO}N8 z6C&nqt_D2QEYot+)Q+h#T9%K~%}4UGkgW1?=U~NIc=M-bk$H#YuBR(?gmLN{W*0w7 z>N)Jp<-G3l^rO#9){&&6CMj>Ny4z>RCc zJUuZy%}6Ol>G{-|H0Cr9OOz;H^d?6_8(oq?l28(_s3bDKAg5rofZlS&vK<+h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z5S>(t?4ojVC@am?_8acObw5sVS@8K>2ilqNL1w`aF<;hmQ|g)+Ey9__T3aB)fo zZ}iUhle$v7vQm~)5?{OD%-)_O&htDaH`O&AebwqGD}8bG?B+tP@31f5(&I5^)2W-# zTOzy8U(41k-sWy5@+2niQchCcN`SnKzG zjj~S)SPe2uDG!2WXEBmBkD8VUwPlf_;ih6ZKur;b(IP^>xBn%9e`Wq53v;@K3iFW-v=&3WzX>ZUes@aAL{(C(jVOXn$;2}rs?=co8JS!P4PpGKS@8quw{WV zmmf&_3zYtZ<)495ZK2**a2lC1KknzRj{XG7Pts4`rD)XL_|lRQ2#&J%ar3Hn%~(CXUq!D`&cv1a`M}0eNaS7+$&YT|RDu2OZjcyxv=3k) zmE9@8CnOgejhjmj~Lalp~}z9R$FcFI)PYuDUVDXxAlk@#^T}n^hksaY@J`| l6LoM-IrG~2g?D=a1^@>-d`lX|xf=ig002ovPDHLkV1hKF%;Eq5 literal 0 HcmV?d00001 diff --git a/game.html b/game.html new file mode 100644 index 0000000..1ce5358 --- /dev/null +++ b/game.html @@ -0,0 +1,303 @@ + + + + + + Apfelschnappen + + + + + + + + + + + + + diff --git a/img.html b/img.html new file mode 100644 index 0000000..c61909b --- /dev/null +++ b/img.html @@ -0,0 +1,68 @@ + + + + + + Testseite + + + + + +
+ + +

Bild

+ + + + + + +
+ Theodor Fontana sagt das Birnen gesund sind. +
+ +
+

+ + + + + + +
+ + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..f932c73 --- /dev/null +++ b/index.html @@ -0,0 +1,66 @@ + + + + + + Testseite + + + + + + +

Testseite

+ + +
+

+ +

+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + diff --git a/script.js b/script.js new file mode 100644 index 0000000..75d6045 --- /dev/null +++ b/script.js @@ -0,0 +1,24 @@ +var character = document.getElementById("character"); +var block = document.getElementById("block"); +var counter=0; +document.addEventListener("click",jump); +function jump(){ + if(character.classList == "animate"){return} + character.classList.add("animate"); + setTimeout(function(){ + character.classList.remove("animate"); + },300); +} +var checkDead = setInterval(function() { + let characterTop = parseInt(window.getComputedStyle(character).getPropertyValue("top")); + let blockLeft = parseInt(window.getComputedStyle(block).getPropertyValue("left")); + if(blockLeft<20 && blockLeft>-20 && characterTop>=130){ + block.style.animation = "none"; + alert("Game Over. score: "+Math.floor(counter/100)); + counter=0; + block.style.animation = "block 1s infinite linear"; + }else{ + counter++; + document.getElementById("scoreSpan").innerHTML = Math.floor(counter/100); + } +}, 10); diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..045523e --- /dev/null +++ b/styles.css @@ -0,0 +1,95 @@ + + + + + + + +button { + display: inline-block; + background-color: #7b38d8; + border-radius: 10px; + border: 4px double #cccccc; + color: #eeeeee; + text-align: center; + font-size: 28px; + padding: 20px; + width: 200px; + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; + -o-transition: all 0.5s; + transition: all 0.5s; + cursor: pointer; + margin: 5px; + } + +input { + margin: 0px; + width:200px + + } +.nomargin { + margin: 0px; +} + + + +.smaller-image { + width: 500px; + } +.test-test { + text-align: center; +} +.rot{color:#ff0000;} + +.center{ + align: "middle"; +} + +.nospace { + display: inline-block; + font-size: 20px; + padding: 20px; +} + + +#game{ + width: 500px; + height: 200px; + border: 1px solid black; + margin: auto; +} + +#character{ + width: 20px; + height: 50px; + background-color: red; + position: relative; + top: 150px; //game height - character height (200 - 50) +} + +@keyframes jump{ + 0%{top: 150px;} + 30%{top: 100px;} + 70%{top: 100px;} + 100%{top: 150px;} +} + +.animate{ + animation: jump 300ms linear; +} + +#block{ + width: 20px; + height: 20px; + background-color: blue; + position: relative; + top: 130px; //game height - character height - block height (200 - 50 - 20) + left: 480px; //game width - block width (500 - 20) + animation: block 1s infinite linear; +} + +@keyframes block{ + 0%{left: 500px} + 100%{left: -20px} +}