Skip to content

Commit

Permalink
add enables, show active classes of movable image in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
moiri committed Aug 30, 2014
1 parent d340b1f commit 34e2000
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion css/test.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

.stone8 {
position:absolute;
bottom:-100px;
bottom:-50px;
height:10px;
width:2000px;
left:150px;
Expand Down
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<div id="fps" class="configElem"></div>
<div id="solidCnt" class="configElem"></div>
<div id="pickUpCnt" class="configElem"></div>
<div id="movableClass" class="configElem" style="display:none"></div>
</div>
<div class="enable">
<div id="enable" class="configElem clickable">
Expand All @@ -47,8 +48,10 @@
appear</div>
<div id="enable-pickUp" class="configElem clickable">
pickUp</div>
<div id="enable-alwaysCheckPosition" class="configElem clickable">
alwaysCheckPosition</div>
<div id="enable-checkPositionAlways" class="configElem clickable">
checkPositionAlways</div>
<div id="enable-checkPositionAllDirections" class="configElem clickable">
checkPositionAllDirections</div>
</div>
</div>
</body>
Expand Down
18 changes: 14 additions & 4 deletions js/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(document).ready(function() {
'solidMoving"></div>');
$('#stone6').addClass('solidOnlyTop');
$('#stone3').addClass('fallThroughBar');
moveUp = function () {
/*moveUp = function () {
$('#elevator1').animate(
{"bottom" : "+=450px"},
//{"top" : "-=450px"},
Expand Down Expand Up @@ -46,7 +46,7 @@ $(document).ready(function() {
moveRight
);
};
moveRight();
moveRight();*/
$('#content').append('<div id="pickUp1" class="pickUp1 pickUp"></div>');
$('#content').append('<div id="pickUp2" class="pickUp2 pickUp"></div>');
$('#solidCnt').text((i-1)*j);
Expand All @@ -71,6 +71,7 @@ $(document).ready(function() {
$('#debug').click(function () {
$('body').toggleClass('debug');
$(this).toggleClass('disable');
$('#movableClass').toggle();
});

$('#enable').click(function () {
Expand Down Expand Up @@ -113,8 +114,12 @@ $(document).ready(function() {
kobold.toggleEnableAttr('pickUp');
$(this).toggleClass('disable');
});
$('#enable-alwaysCheckPosition').click(function () {
kobold.toggleEnableAttr('alwaysCheckPosition');
$('#enable-checkPositionAlways').click(function () {
kobold.toggleEnableAttr('checkPositionAlways');
$(this).toggleClass('disable');
});
$('#enable-checkPositionAllDirections').click(function () {
kobold.toggleEnableAttr('checkPositionAllDirections');
$(this).toggleClass('disable');
});

Expand All @@ -132,5 +137,10 @@ $(document).ready(function() {
engine.toggleEnableCollider($('#elevator1'));
});
}
refresh = function () {
$('#movableClass').html($('#kobold-img').attr('class'));
setTimeout(refresh, 100);
}
refresh();
});

0 comments on commit 34e2000

Please sign in to comment.