这是我很久以前在某网站的404页面看到的,当时就觉得好玩,然后又过了很久才找到Github上的demo,又过了很久,我才下来玩。
一个小游戏demo,适合放在网页的某个小角落做点缀。
原作者github地址:https://github.com/ganlvtech/phaser-catch-the-cat
只需在html中引入js即可
<!DOCTYPE html>
<html lang="en"></html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=0.7, maximum-scale=1.0, user-scalable=0" charset="UTF-8">
<title>Catch That Cat!</title>
<script src="phaser.min.js"></script>
<script src="catch-the-cat.js"></script>
<style>
#catch-the-cat {
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<div class="container">
<div id="catch-the-cat"></div>
<script>
window.game = new CatchTheCatGame({
w: 11,
h: 11,
r: 20,
backgroundColor: 0xeeeeee,
parent: 'catch-the-cat',
statusBarAlign: 'center',
credit: 'Your name...'
});
</script>
</div>
</body>
</html>
这个玩意放在404页面再好不过了,或者放在网页加在等待页面,起码能够增添一点点乐趣
原创文章,作者:Rosmontics,如若转载,请注明出处:https://rosmontis.com/archives/167
评论列表(3条)
nb
666
@111:呵呵