mirror of
https://github.com/wassname/phaser.git
synced 2026-07-25 13:20:14 +08:00
Plugin Support added and CameraFX re-enabled
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// Module
|
||||
var Shapes;
|
||||
(function (Shapes) {
|
||||
// Class
|
||||
var Point = (function () {
|
||||
// Constructor
|
||||
function Point(x, y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
Point.prototype.getDist = // Instance member
|
||||
function () {
|
||||
return Math.sqrt(this.x * this.x + this.y * this.y);
|
||||
};
|
||||
Point.origin = new Point(0, 0);
|
||||
return Point;
|
||||
})();
|
||||
Shapes.Point = Point;
|
||||
})(Shapes || (Shapes = {}));
|
||||
// Local variables
|
||||
var p = new Shapes.Point(3, 4);
|
||||
var dist = p.getDist();
|
||||
Reference in New Issue
Block a user