previous

page 25

next
Messages

You can of course add your own messages but this is what I came up with:

in set_scene:
if (g_scene==1 && g_count==0) {
message('Search the island for the seven colours to make the rainbow.');
}
and in shape_clicked:
if (g_count==6) message('Just one colour to find<br>but where can it be?');
if (g_count==7) message('Return to the start to see the complete rainbow.');
and of course I had to write the message function
which I included in set_scene.js.
function message(m) {
var el=document.getElementById('message');
el.innerHTML=m;
Show('message');
}
and some cosmetics - the following is the top of my styles.css:
body {
background-color:black;
}
img {
height: 100%;
}
#game {
margin: 2vmin auto;
...
previous
next