API Docs for:
Show:

MeleeAttack Class

An object describing a melee attack.

Constructor

MeleeAttack

(
  • scanShape
  • damageAmount
  • damageType
)

Parameters:

  • scanShape Box | Circle | Polygon

    Object representing the area affected by the melee attack.

  • damageAmount Number

    The amount of damage dealt by the melee attack.

  • damageType String

    The type of damage dealt by the melee attack. This type can be 'c' for cyan, 'm' for magenta, 'y' for yellow and 'w' for white.

Methods

getDamageAmount

() Number

Returns:

Number:

getDamageType

() String | Null

Returns:

String | Null: Returns 'c', 'm', 'y' or 'w' if a correct damage type was set. If no damage type was set, it'll return null.

getScanShape

() Box | Circle | Polygon

Returns:

setDamageAmount

(
  • damageAmount
)

Parameters:

  • damageAmount Number

    The amount of damage dealt by the melee attack.

setDamageType

(
  • damageType
)

Parameters:

  • damageType String

    The type of damage dealt by the melee attack. This type can be 'c' for cyan, 'm' for magenta, 'y' for yellow and 'w' for white.

setScanShape

(
  • scanShape
)

Parameters:

  • scanShape Box | Circle | Polygon

    Object representing the area affected by the melee attack.