Sets the hit area for an array of Game Objects to be a Phaser.Geom.Triangle
shape, using
the given coordinates to control the position of its points.
name | type | arguments | description |
---|---|---|---|
gameObjects | Phaser.GameObjects.GameObject | Array.<Phaser.GameObjects.GameObject> |
An array of Game Objects to set as having a triangular hit area. |
|
x1 | number |
The x coordinate of the first point of the triangle. |
|
y1 | number |
The y coordinate of the first point of the triangle. |
|
x2 | number |
The x coordinate of the second point of the triangle. |
|
y2 | number |
The y coordinate of the second point of the triangle. |
|
x3 | number |
The x coordinate of the third point of the triangle. |
|
y3 | number |
The y coordinate of the third point of the triangle. |
|
callback | Phaser.Types.Input.HitAreaCallback | <optional> |
The hit area callback. If undefined it uses Triangle.Contains. |
This InputPlugin object.