Skip to content

Commit

Permalink
First commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Remnan13 committed Jun 1, 2018
0 parents commit 71a0152
Show file tree
Hide file tree
Showing 14 changed files with 109 additions and 0 deletions.
Binary file added acidBlob.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added boneHag.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added corpseHydra.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added crystal.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added darkBlob.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions darkscrolls.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
div.row div{
width: 60px;
height: 60px;
display: inline-block;
}
div#world{
}
div.brick{
background-color: darkred;
}

div.empty{
}

div.coin{
background: url('crystal.gif');
background-repeat: none;
background-position: center;
background-size: contain;
}
div#mainChar{
background: url('mainChar.gif');
width: 60px;
height: 60px;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
position: absolute;
top: 60px;
left: 60px;
}

body{
background-color: black;
line-height: 0px;
margin: 0px;
}
17 changes: 17 additions & 0 deletions darkscrolls.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Kyle's Dark Scroll Demo</title>
<link type="text/css" rel="stylesheet" href="darkscrolls.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

</head>
<body>
<div id="world"></div>

<div id="mainChar"></div>

<script type="text/javascript" src="Pacman.js">
</script>
</body>
</html>
55 changes: 55 additions & 0 deletions darkscrolls.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
var world = [
[2,2,2,2,2,2,2,2,2,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,1,1,1,1,1,1,1,1,2],
[2,2,2,2,2,2,2,2,2,2]
];

var mainChar = {
x: 60,
y: 60
}

function displayWorld(){
var output = '';

for(var i=0; i<world.length; i++){
output += "<div class='row'>";
for(var j=0; j<world[i].length; j++){
if(world[i][j] == 3){
output+= "<div id='mainChar'></div>";
}
if(world[i][j] == 2){
output += "<div class='brick'></div>";
}
else if(world[i][j] == 1){
output += "<div class='coin'></div>";
}
if(world[i][j] == 0){
output += "<div class='empty'></div>";
}
}
output += "</div>";
}
document.getElementById('world').innerHTML = output;
}

document.getElementById("mainChar").style.top += 60;

displayWorld();

document.onkeydown = function(e){
if(e.keyCode==37)
{
if(mainChar.x)
document.getElementById('mainChar').style.t;
}
console.log(e.keyCode);
}
Binary file added dracoLich.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fireBlob.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mainChar.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oni.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phaseDemon.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added waterBlob.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 71a0152

Please sign in to comment.