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.

101 lines
3.1 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>
<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>
<script>
// saves game step in the local storage
window.onload = function() {
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();
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();
$("#player_img").removeClass("player_land");
$("#player_img").hide();
$(".boat").animate({ left: "100%" }, {
duration: 2500 })
.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>