diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..401f099
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/index.html~
+/main.css~
+/main.js~
diff --git a/assets/bar.png b/assets/bar.png
new file mode 100644
index 0000000..1f89703
Binary files /dev/null and b/assets/bar.png differ
diff --git a/assets/barfill.png b/assets/barfill.png
new file mode 100644
index 0000000..07e3c85
Binary files /dev/null and b/assets/barfill.png differ
diff --git a/assets/eknife.png b/assets/eknife.png
new file mode 100644
index 0000000..7a69101
Binary files /dev/null and b/assets/eknife.png differ
diff --git a/cache.manifest b/cache.manifest
index 23f6899..30724e9 100644
--- a/cache.manifest
+++ b/cache.manifest
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# v2.0.0d13
+# v2.0.0d14
CACHE:
index.html
main.js
diff --git a/index.html b/index.html
index 930343b..a77026a 100644
--- a/index.html
+++ b/index.html
@@ -16,10 +16,6 @@
@@ -54,6 +50,15 @@ Parts of this game includes code from other sources.
+
+
+
+
▲
diff --git a/main.css b/main.css
index b665b2c..076590d 100644
--- a/main.css
+++ b/main.css
@@ -74,7 +74,7 @@ right: 10px;
#bar {
background-color: rgba(0, 0, 0, 0.0);
-z-index: 1;
+z-index: 2;
color: #eee;
padding: 10px 0px;
position: absolute;
@@ -206,3 +206,33 @@ float: left;
display: inline-block;
margin-left: 30px;
}
+#frame {
+width: 0;
+height: 0;
+}
+#bunny {
+display: none;
+width: 100px;
+height: 175px;
+position: absolute;
+top: 50%;
+left: 50%;
+margin-top: -82.5px;
+margin-left: -50px;
+background: url(assets/you.png);
+background-size: 100% 100%;
+z-index: 3;
+}
+.enemy {
+display: block;
+width: 100px;
+height: 175px;
+position: absolute;
+top: 0px;
+left: 0px;
+margin-top: 0px;
+margin-left: 0px;
+background: url(assets/eknife.png);
+background-size: 100% 100%;
+z-index: 1;
+}
\ No newline at end of file
diff --git a/main.js b/main.js
index b52e227..d47d8cb 100644
--- a/main.js
+++ b/main.js
@@ -8,8 +8,10 @@ var interb=0;
var interl=0;
var interr=0;
var player={
- x: 0,
- y: 0
+x: 0,
+y: 0,
+health: 100,
+weapon: 0
};
var evil=[];
@@ -19,19 +21,19 @@ return Math.atan2(bx-x, by-y)/Math.PI*-180;
function dpf() {
map.panBy(0, -step);
-player["x"]-=step;
+player.x-=step;
}
function dpb() {
map.panBy(0, step);
-player["x"]+=step;
+player.x+=step;
}
function dpl() {
map.panBy(-step, 0);
-player["y"]-=step;
+player.y-=step;
}
function dpr() {
map.panBy(step, 0);
-player["y"]+=step;
+player.y+=step;
}
window.addEventListener('load', function(e) {
@@ -95,15 +97,15 @@ $("#dpf, #dpb, #dpl, #dpr").css("display", "none");
//stackoverflow
function getPosition(e) {
- var targ;
- if (!e)
- e = window.event;
- if (e.target)
- targ = e.target;
- else if (e.srcElement)
- targ = e.srcElement;
- if (targ.nodeType == 3)
- targ = targ.parentNode;
+var targ;
+if (!e)
+e = window.event;
+if (e.target)
+targ = e.target;
+else if (e.srcElement)
+targ = e.srcElement;
+if (targ.nodeType == 3)
+targ = targ.parentNode;
var x = e.pageX - $(targ).offset().left;
var y = e.pageY - $(targ).offset().top;
$("#dirh").css("transform", "rotate("+angle(x, y, $("#you").width()/2, $("#you").height()/2)+"deg)");
@@ -284,6 +286,7 @@ function getready() {
$("#menu").fadeOut();
$("#bar").css("background-color", "rgba(0, 0, 0, 0.5)");
$("#sec").html("Ready");
+$("#bunny").fadeIn();
setTimeout(function() {
$("#sec").html("Set");
}, 2000);
@@ -292,7 +295,6 @@ $("#sec").html("Go! ");
}, 4000);
setTimeout(function() {
$("#kills").html("0 kills");
-
$("#tgp").fadeIn().click(function() {
end();
});
diff --git a/xcf/bar.xcf b/xcf/bar.xcf
new file mode 100644
index 0000000..398ec9e
Binary files /dev/null and b/xcf/bar.xcf differ
diff --git a/xcf/barfill.xcf b/xcf/barfill.xcf
new file mode 100644
index 0000000..bd05b05
Binary files /dev/null and b/xcf/barfill.xcf differ
diff --git a/xcf/eknife.xcf b/xcf/eknife.xcf
new file mode 100644
index 0000000..715039d
Binary files /dev/null and b/xcf/eknife.xcf differ