You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
3.9 KiB
HTML
123 lines
3.9 KiB
HTML
4 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="en-US">
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
|
<title>river bank</title>
|
||
|
<link rel="icon" href="imgs/river_bank/water.png">
|
||
|
<link rel="stylesheet" href="river_bank.css">
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
4 years ago
|
|
||
|
<audio loop="loop" id="theme3" preload="auto"><source src="sound/theme3_danger.mp3" type="audio/mp3"></audio>
|
||
|
<audio id="comic"><source src="sound/baloon_intense.wav" type="audio/wav"></audio>
|
||
|
<audio id="click"><source src="sound/click.wav" type="audio/wav"></audio>
|
||
|
<audio id="water"><source src="sound/click.wav" type="audio/wav"></audio>
|
||
|
|
||
|
|
||
4 years ago
|
<div id="ground" class="invert"></div>
|
||
|
<!--<div class="ground_line invert"></div>-->
|
||
|
|
||
|
<!--characters-->
|
||
4 years ago
|
<div id="player_img" class="player_land moving_duo"></div>
|
||
|
<img id="army" src="imgs/river_bank/army1.gif" height="270px">
|
||
|
|
||
4 years ago
|
<div class="ferryman">
|
||
|
<img id="ferryman_good" src="imgs/river_bank/sailor1.gif" height="120px">
|
||
|
<img id="ferryman_evil" src="imgs/river_bank/ferryman.gif" height="120px"style="display: none;">
|
||
|
</div>
|
||
4 years ago
|
|
||
4 years ago
|
|
||
|
<img id="river" src="imgs/river_bank/water.png">
|
||
|
<div class="boat moving_duo">
|
||
|
<img id="boat_empty" src="imgs/river_bank/boat.png" width="440px" >
|
||
|
<img id="boat_full" src="imgs/river_bank/boat_people.gif" width="440px" style="display: none;">
|
||
|
</div>
|
||
|
|
||
|
<!--baloons-->
|
||
|
<div class="bubble invert" style="display: none;">!!!</div>
|
||
4 years ago
|
<div class="bubble2 invert" style="display: none;">!!!</div>
|
||
|
|
||
4 years ago
|
|
||
|
|
||
|
|
||
|
|
||
|
<!--bottom text-->
|
||
|
<div class="text_container invert">
|
||
|
<div class="message1">
|
||
|
You are now at the River Bank. According to the newspaper, this is where the school trip started. <br>
|
||
4 years ago
|
<span class="instructions"><span class="instructions_arrow">→</span> Click on the ferryman to persuade him to show you the way to the Spring River Park and liberate the children!</span>
|
||
4 years ago
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<script src="jquery.min.js"></script>
|
||
4 years ago
|
<script>
|
||
|
//audio
|
||
|
var theme = document.querySelector("#theme3");
|
||
|
var comic = document.querySelector("#comic");
|
||
|
var click = document.querySelector("#click");
|
||
|
var water = document.querySelector("#water");
|
||
|
|
||
|
$("body").hover( function() {
|
||
|
theme.play();
|
||
|
theme.addEventListener('paused',function() {
|
||
|
theme.play();
|
||
|
},false);
|
||
|
})
|
||
|
|
||
|
// saves game step in the local storage
|
||
4 years ago
|
window.onload = function() {
|
||
4 years ago
|
theme.play();
|
||
4 years ago
|
window.localStorage.setItem("river_bank","opened");
|
||
|
console.log ("river bank:",localStorage.river_bank);
|
||
|
$(".fighters").html("0");
|
||
|
}
|
||
|
|
||
|
//get player avatar from local storage
|
||
|
console.log (localStorage.myavatar)
|
||
|
var img = document.createElement("img");
|
||
|
img.src = localStorage.myavatar;
|
||
|
var player_img = document.querySelector("#player_img");
|
||
|
player_img.appendChild(img);
|
||
4 years ago
|
|
||
|
|
||
|
// boat animation
|
||
|
|
||
4 years ago
|
$(".ferryman").click (function(){
|
||
4 years ago
|
console.log("ciao");
|
||
|
$(".bubble").show();
|
||
4 years ago
|
comic.play();
|
||
4 years ago
|
setTimeout( function() {
|
||
4 years ago
|
$("#ferryman_good").hide();
|
||
|
$(".bubble2,#ferryman_evil").show();
|
||
4 years ago
|
setTimeout( function() {
|
||
|
$(".bubble2,.bubble").hide();
|
||
|
setTimeout( function() {
|
||
4 years ago
|
$("#ferryman_evil").detach();
|
||
|
$("#boat_empty, #army").hide();
|
||
4 years ago
|
$("#boat_full").show();
|
||
4 years ago
|
water.play();
|
||
4 years ago
|
$("#player_img").removeClass("player_land");
|
||
|
$("#player_img").hide();
|
||
|
$(".boat").animate({ left: "100%" }, {
|
||
4 years ago
|
duration: 3500 })
|
||
4 years ago
|
.promise().done(function(){
|
||
|
location.href='spring_river.html';
|
||
|
});
|
||
4 years ago
|
}, 1500);
|
||
4 years ago
|
}, 1000);
|
||
|
}, 1000);
|
||
|
});
|
||
|
|
||
|
|
||
4 years ago
|
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<script type="text/javascript" src="index.js" ></script>
|
||
|
|
||
|
|
||
|
</body>
|