2013-08-28 06:02:55 +00:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>phaser.js - a(nother) new beginning</title>
|
|
|
|
<script src="../src/Phaser.js"></script>
|
|
|
|
<script src="../src/system/Device.js"></script>
|
|
|
|
<script src="../src/core/SignalBinding.js"></script>
|
|
|
|
<script src="../src/core/Signal.js"></script>
|
|
|
|
<script src="../src/math/RandomDataGenerator.js"></script>
|
2013-08-28 14:27:22 +00:00
|
|
|
<script src="../src/math/Math.js"></script>
|
2013-08-28 14:58:37 +00:00
|
|
|
<script src="../src/geom/Point.js"></script>
|
2013-08-28 14:27:22 +00:00
|
|
|
<script src="../src/geom/Circle.js"></script>
|
|
|
|
<script src="../src/net/Net.js"></script>
|
2013-08-28 06:02:55 +00:00
|
|
|
<script src="../src/time/Time.js"></script>
|
|
|
|
<script src="../src/animation/Animation.js"></script>
|
|
|
|
<script src="../src/animation/Frame.js"></script>
|
|
|
|
<script src="../src/animation/FrameData.js"></script>
|
|
|
|
<script src="../src/animation/Parser.js"></script>
|
|
|
|
<script src="../src/loader/Cache.js"></script>
|
|
|
|
<script src="../src/loader/Loader.js"></script>
|
|
|
|
<script src="../src/Game.js"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var game = new Phaser.Game(this, '', 800, 600);
|
|
|
|
|
2013-08-28 14:58:37 +00:00
|
|
|
var a = new Phaser.Point(100, 100);
|
|
|
|
var b = new Phaser.Point(200, 100);
|
2013-08-28 14:27:22 +00:00
|
|
|
|
2013-08-28 14:58:37 +00:00
|
|
|
console.log('Point A', a.toString());
|
|
|
|
console.log('Point B', b.toString());
|
2013-08-28 14:27:22 +00:00
|
|
|
|
2013-08-28 14:58:37 +00:00
|
|
|
a.add(b.x, b.y);
|
2013-08-28 06:02:55 +00:00
|
|
|
|
2013-08-28 14:58:37 +00:00
|
|
|
console.log('Point A + B', a.toString());
|
|
|
|
|
|
|
|
console.log('Distance between A and B', Phaser.Point.distance(a, b));
|
2013-08-28 06:02:55 +00:00
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|