phaser/wip/TS Source/particles/zone/PointZone.ts
2013-09-13 16:24:01 +01:00

31 lines
564 B
TypeScript

/// <reference path="../../_definitions.ts" />
module Phaser.Particles.Zones {
export class PointZone extends Zone {
constructor(x=0,y=0) {
super();
this.x = x;
this.y = y;
}
x;
y;
getPosition() {
return this.vector.setTo(this.x, this.y);
}
crossing(particle) {
if (this.alert)
{
alert('Sorry PointZone does not support crossing method');
this.alert = false;
}
}
}
}