Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TargetModeClosestOne

Target mode which selects the closest one within within the given radius. It will return only one target (Used by single-target towers like the arrowtower), if you need multiple targets (Like the lightningtower), use @see TargetModeAllWithinRange

Hierarchy

Index

Constructors

constructor

Methods

deserialize

  • deserialize(data: any): any

drawVisualizer

  • drawVisualizer(entity: any, parameters: any, time: any): void
  • see

    BaseTargetMode.drawVisualizer

    Parameters

    • entity: any
    • parameters: any
    • time: any

    Returns void

getDebugString

  • getDebugString(): string

getTileRadiusForDefenseView

  • getTileRadiusForDefenseView(): any

isTargetAvailable

  • isTargetAvailable(sourceFaction: any, targetEntity: any, root: any): boolean
  • Helper method to check if an entity is available as a target from the given source faction

    Parameters

    • sourceFaction: any
    • targetEntity: any
    • root: any

    Returns boolean

selectTargets

  • selectTargets(sourceEntity: any, root: any, excludeList?: any, sourceFactionOverride?: any): any[]
  • see

    BaseTargetMode.selectTargets

    Parameters

    • sourceEntity: any
    • root: any
    • Default value excludeList: any = null
    • Default value sourceFactionOverride: any = null

    Returns any[]

serialize

  • serialize(): object

Static getCachedSchema

  • getCachedSchema(): any

Static getId

  • getId(): string
  • Returns string

Static getSchema

  • getSchema(): any

Static verify

  • verify(data: any): string