Callback that will be applied for each mob once, who got captured by this AoE.
Center of this AoE
Range of this AoE in px
Which type of mobs is this AoE capturing. Rather player, enemy or both.
Maximum units that this AoE can capture, <= 0 means no limit. It is recommended to set a non-identity compareFunc when a maxCapture number is set.
The compareing function that will be used when quering the captured unit list. If set, target list will be sorted wrt this function, default is Identity (no sort).
Generated using TypeDoc
Helper function for easily performing Area of Effects (AoE). Currently only supports a circle area.
Example:
AoE( (m: Mob, list: Mob[]) => { // In fact it is not good to perform a HealDmg without assigning a source. HealDmg({'target': m, 'value': 200 / list.length, 'type': 'fire'}); }, new Phaser.Math.Vector2(200, 200), 100, Targeting.Both );
Above code will perform a fire type AoE attack, centered at (200, 200) with range 100, dealing a splitable 200 damage (in total) to all targets inside its range.