mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 11:33:28 +00:00
32 lines
564 B
TypeScript
32 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;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|