通过鼠标使人物移动
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script src="rpg-beta-2.js"></script>
<script>
var rpg;
RPGJS.load(function() {
rpg = new Rpg("canvas_rpg");
rpg.loadMap('MAP001', {
tileset: '023-FarmVillage01.png',
player: {
x: 26,
y: 18,
filename: '001-Fighter01.png'
}
}, function () {
rpg.player.setTypeMove('tile');
rpg.player.useMouse(true);
rpg.setScreenIn("Player");
});
});
</script>
</head>
<body>
<canvas id="canvas_rpg" width="640px" height="480px"></canvas>
</body>
</html>