CALLUP GAME ENGINE
window.onload = function() {
}
window.onload = function() {
var body = document.getElementsByTagName('body')[0];
body.addEventListener("click", function() {
});
}
window.onload = function() {
var body = document.getElementsByTagName('body')[0];
body.addEventListener("click", function() {
//run code
let start = document.createElement('button');
start.addEventListener("click", function() {
start.style.display= "none";
var cli = 10;
let load = document.createElement('div');
callup.appendChild(load);
load.style= "position: absolute; top: 0; z-index: 999999; margin-top: 30%; width: 10px; background-color: #507bba; height: 10px;";
function rep() {
cli += 10;
var clip = cli + "px";
load.style.width = clip;
if(cli > 800){
//write the code of your game here represented by an id
}
}
setInterval(rep, 1000);
});
callup.appendChild(start);
let callup = document.getElementsById('canvas')[0];
callup.addEventListener("click", function() {
});
});
}
window.onload = function() {
var body = document.getElementsByTagName('body')[0];
body.addEventListener("click", function() {
//run your code
});
}
window.onload = function() {
var body = document.getElementsByTagName('body')[0];
body.addEventListener("click", function() {
let start = document.createElement('button');
body.appendChild(start);
start.innerHTML= "PRESS TO START GAME";
var cli = 10;
start.addEventListener("click", function() {
start.style.display= "none";
let list = document.createElement('div');
list.style= "width: 10px; height: 10px; background: blue;";
function rep() {
cli += 10;
var clip = cli + "px";
list.style.width = clip;
if(cli > 800) {
list.style.display= "none";
//add your code
}
}
setInterval(rep, 1000);
body.appendChild(list);
});
});
}