1
0
Fork 0

v2.0.0d8 first line of the movement system

master
Ambrose Chua 2013-03-18 10:11:15 +08:00
parent 1905fc3f60
commit 0aa9285fe7
3 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
# v2.0.0d7 # v2.0.0d8
CACHE: CACHE:
index.html index.html
main.js main.js

View File

@ -33,7 +33,7 @@
<!-- <div id="about" class="btn" onClick="alert('The bunnies have not made this work yet! ');">About</div> --> <!-- <div id="about" class="btn" onClick="alert('The bunnies have not made this work yet! ');">About</div> -->
<div class="btn" id="about">About</div> <div class="btn" id="about">About</div>
<a href="http://ambrosechua.github.com/thebunniesinc/" class="btn">How to play</a> <a href="http://ambrosechua.github.com/thebunniesinc/" class="btn">How to play</a>
<span style="font-size: 12px;">Alpha Version 2.0.0 release 7</span> <span style="font-size: 12px;">Alpha Version 2.0.0 release 8</span>
</div> </div>
<div id="aboutc"> <div id="aboutc">

View File

@ -1,10 +1,14 @@
step=3; step=3;
stti=10; stti=10;
frames=stti/2;
interf=0; interf=0;
interb=0; interb=0;
interl=0; interl=0;
interr=0; interr=0;
player["x"]=0;
player["y"]=0;
evil;
function angle(x, y, bx, by) { function angle(x, y, bx, by) {
return Math.atan2(bx-x, by-y)/Math.PI*-180; return Math.atan2(bx-x, by-y)/Math.PI*-180;
@ -12,15 +16,19 @@ return Math.atan2(bx-x, by-y)/Math.PI*-180;
function dpf() { function dpf() {
map.panBy(0, -step); map.panBy(0, -step);
player["x"]-=step;
} }
function dpb() { function dpb() {
map.panBy(0, step); map.panBy(0, step);
player["x"]+=step;
} }
function dpl() { function dpl() {
map.panBy(-step, 0); map.panBy(-step, 0);
player["y"]-=step;
} }
function dpr() { function dpr() {
map.panBy(step, 0); map.panBy(step, 0);
player["y"]+=step;
} }
$("#endg").click(function() { $("#endg").click(function() {