Skip to content

Commit

Permalink
Merge pull request #104 from java-women/feature/stage202
Browse files Browse the repository at this point in the history
#93対応
  • Loading branch information
cyoco authored Jul 23, 2016
2 parents d81519c + 69c6a72 commit b71a6b5
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var gameStatus=0; //1:GOAL 2:LOST
var inputEnemySpeed=10;
var inputMotionHeight=10;
var inputEnemyHeight=100;
var inputEnemyWidth=100;
var inputEnemyWidth=400;
//敵キャラクター1の動き傾斜
var RATE=2;

Expand All @@ -31,8 +31,8 @@ function editData(){
try {
inputEnemySpeed = getIntValue("enemy-speed",3,100);
inputMotionHeight = getIntValue("motion-height",0,100);
inputEnemyHeight = getIntValue("enemy-height",0,1000);
inputEnemyWidth = getIntValue("enemy-width",0,1000);
inputEnemyHeight = getIntValue("enemy-height",0,150);
inputEnemyWidth = getIntValue("enemy-width",0,400);
core.replaceScene(createStartScene());
} catch(e) {
alert("うまく動かなかった。\r\nやり直してね。");
Expand Down Expand Up @@ -143,7 +143,7 @@ function createGameScene(){
//スクロール
bear.x-=4;
map.x-=3;
pig1.x-=inputEnemySpeed;
pig1.x-=3;
}
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,63 @@
<!DOCTYPE html>
<html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title>ぶたさんをじゆうにうごかそう!</title>
<link th:substituteby="common/head :: common_head"/>
<link th:substituteby="common/head-chat :: common_head_chat"/>
<script type="text/javascript" src="enchant.js"></script>
<script type="text/javascript" src="plugins/ui.enchant.js"></script>
<script type="text/javascript" src="js/stage-common.js"></script>
<script type="text/javascript" src="js/condition002.js"></script>
<link rel="stylesheet" href="css/condition002.css" />
</head>
<body>
<div th:include="common/header :: common_header"></div>

<div class="container">
<div id="enchant-stage"></div>
<div id="editor">
<div class="row">
<div class="col-lg-12">
<div th:include="common/toggle-button :: common_toggle_button"></div>
<div id="editor" class="collapse">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-success">
<div class="panel-heading">
<h2 class="panel-title">ぶたさんをじゆうにうごかそう!</h2>
</div>
<div class="panel-body panel-padding">
<pre>
ぶたさんのたて位置 = <input type="text" value="100" id="enemy-height" />;
ぶたさんのよこ位置 = <input type="text" value="100" id="enemy-width" />;
ぶたさんのスピード = <input type="text" value="10" id="enemy-speed" />;

if (ゲームの時間 / ぶたさんの動く幅 <input type="text" value="4" id="motion-height" />)
< (ぶたさんの動く幅/2){
ぶたさんは上へ
} else {
ぶたさんは下へ
}
</pre>
<div class="input-group">
<button class="btn btn-lg btn-primary" onclick="editData()">Edit</button>
<div class="panel-body">
<p>ぶたさんはここにいるよ</p>
<div class="col-sm-6">
<div class="input-group input-group-lg">
<span class="input-group-addon">よこ</span>
<input type="text" class="form-control" value="400" id="enemy-width"/>
</div>
</div>
<div class="col-sm-6">
<div class="input-group input-group-lg">
<span class="input-group-addon">たて</span>
<input type="text" class="form-control" value="100" id="enemy-height"/>
</div>
</div>
</div>
<div class="panel-body">
<p>ぶたさんの速さを決めるよ</p>
<div class="col-sm-6">
<div class="input-group input-group-lg">
<span class="input-group-addon">スピード</span>
<input type="text" class="form-control" value="10" id="enemy-speed"/>
</div>
</div>
<div class="col-sm-6">
<div class="input-group input-group-lg">
<span class="input-group-addon">動く幅</span>
<input type="text" class="form-control" value="10" id="motion-height"/>
</div>
</div>
</div>
<div class="panel-body">
<div class="col-sm-12">
<div class="input-group">
<button class="btn btn-lg btn-primary" onclick="editData()"><span class="glyphicon glyphicon-edit"></span> へんこう</button>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit b71a6b5

Please sign in to comment.