Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Core

Index

Type aliases

AoECBm

AoECBm: (mob: Mob) => void

Type declaration

    • (mob: Mob): void
    • Parameters

      Returns void

AoECBml

AoECBml: (mob: Mob, list: Mob[]) => void

Type declaration

    • (mob: Mob, list: Mob[]): void
    • Parameters

      Returns void

AoECBmli

AoECBmli: (mob: Mob, list: Mob[], idx: number) => void

Type declaration

    • (mob: Mob, list: Mob[], idx: number): void
    • Parameters

      • mob: Mob
      • list: Mob[]
      • idx: number

      Returns void

Functions

AoE

  • 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.

    Parameters

    • func: AoECBm | AoECBml | AoECBmli

      Callback that will be applied for each mob once, who got captured by this AoE.

    • pos: Vector2

      Center of this AoE

    • range: number

      Range of this AoE in px

    • targets: Targeting

      Which type of mobs is this AoE capturing. Rather player, enemy or both.

    • Default value maxCapture: number = -1

      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.

    • Default value compareFunc: mRTypes.CompareFunc<Mob> = UnitManager.IDENTITY

      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).

    Returns void

ColorToStr

  • ColorToStr(color: Color): string

HealDmg

getRandomFloat

  • getRandomFloat(min: number, max: number): number

getRandomInt

  • getRandomInt(min: number, max: number): number

radian

  • radian(degree: number): number

reverseTarget

Generated using TypeDoc