-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
added text to speech and delete page function
1 parent
c6234a2
commit f6a34c2
Showing
618 changed files
with
311,564 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
// user has clicked a delete hyperlink | ||
if($_GET['action'] && $_GET['action'] == 'delete') { | ||
unlink($_GET['filename']); | ||
header("Location: ./index.html"); | ||
exit(); | ||
} | ||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<!DOCTYPE | ||
html> | ||
<html | ||
lang="en"> | ||
<head> | ||
<meta | ||
charset="utf-8"> | ||
<title> | ||
2d | ||
</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width"/> | ||
<style> | ||
/* mobile */ | ||
canvas { | ||
padding: 0; | ||
margin: 0; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
border: 1px solid #d3d3d3; | ||
background-color: #f1f1f1; | ||
} | ||
</style> | ||
<link | ||
rel="stylesheet" | ||
type="text/css" | ||
href="./server/files/main.css"> | ||
</head> | ||
<body> | ||
<br><br><br><br> | ||
<br><br><br><br> | ||
<br><br><br> | ||
<body onload="startGame()"> | ||
<script> | ||
|
||
var myGamePiece; | ||
|
||
function startGame() { | ||
myGamePiece = new component(30, 30, "red", 10, 120); | ||
myGameArea.start(); | ||
} | ||
|
||
var myGameArea = { | ||
canvas : document.createElement("canvas"), | ||
start : function() { | ||
this.canvas.width = 320; | ||
this.canvas.height = 200; | ||
this.context = this.canvas.getContext("2d"); | ||
document.body.insertBefore(this.canvas, document.body.childNodes[0]); | ||
this.interval = setInterval(updateGameArea, 20); | ||
}, | ||
clear : function() { | ||
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); | ||
} | ||
} | ||
|
||
function component(width, height, color, x, y) { | ||
this.width = width; | ||
this.height = height; | ||
this.speedX = 0; | ||
this.speedY = 0; | ||
this.x = x; | ||
this.y = y; | ||
this.update = function() { | ||
ctx = myGameArea.context; | ||
ctx.fillStyle = color; | ||
ctx.fillRect(this.x, this.y, this.width, this.height); | ||
} | ||
this.newPos = function() { | ||
this.x += this.speedX; | ||
this.y += this.speedY; | ||
} | ||
} | ||
|
||
function updateGameArea() { | ||
myGameArea.clear(); | ||
myGamePiece.newPos(); | ||
myGamePiece.update(); | ||
} | ||
|
||
function moveup() { | ||
myGamePiece.speedY -= 1; | ||
} | ||
|
||
function movedown() { | ||
myGamePiece.speedY += 1; | ||
} | ||
|
||
function moveleft() { | ||
myGamePiece.speedX -= 1; | ||
} | ||
|
||
function moveright() { | ||
myGamePiece.speedX += 1; | ||
} | ||
</script> | ||
<div style="text-align:center;width:320px;"> | ||
<button onclick="moveup()">UP</button><br><br> | ||
<button onclick="moveleft()">LEFT</button> | ||
<button onclick="moveright()">RIGHT</button><br><br> | ||
<button onclick="movedown()">DOWN</button> | ||
</div> | ||
<center> | ||
<br> | ||
<br> | ||
<a href="../index.html">return to homepage</a> |
Oops, something went wrong.