Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ControllEffectReceiverComponent

The controll effect receiver component makes the entity recieve controll effects, those are for example slowdown, knockback and stuns.

The component is divide into two parts. There are over time effects like movement slowdown and attack slowdown which need to be set every frame! Since they get resetted at the beginning of a logic update. The reason is that it would be super annoying to have to track which entities already received which effects, and which no longer receive effects.

Additionally there are properties like stuns and knockbacks which are set once and then decay.

Hierarchy

Index

Constructors

constructor

Methods

addBurnDamage

  • addBurnDamage(damagePerSec: any): void
  • Sets the given burn damage per second, this is an over time effect and needs to be called every frame while its active

    Parameters

    • damagePerSec: any

    Returns void

addKnockback

  • addKnockback(direction: any): void
  • Knocks back the entity in the given direction.

    Parameters

    • direction: any

    Returns void

deserialize

  • deserialize(data: any): any

getDebugString

  • getDebugString(): string
  • Returns string

isStunned

  • isStunned(): boolean
  • Returns if this entity is currently stunned

    Returns boolean

resetOverTimeEffects

  • resetOverTimeEffects(): void
  • Resets all over-time effects on this entity

    Returns void

serialize

  • serialize(): object

setAttackSlowdown

  • setAttackSlowdown(slowdownFactor: any): void
  • Sets the given attack slowdown in percentage, this is an over time effect and needs to be called every frame while its active

    Parameters

    • slowdownFactor: any

      0 = no attack slowdown, full attack speed | 1 = 100% slowdown, no attacks

    Returns void

setMovementSlowdown

  • setMovementSlowdown(slowdownFactor: any): void
  • Sets the given movement slowdown in percentage, this is an over time effect and needs to be called every frame while its active

    Parameters

    • slowdownFactor: any

      0 = no slowdown, full movement | 1 = 100% slowdown, no movement

    Returns void

stunFor

  • stunFor(seconds: any): void
  • Stuns the entity for the given amount of seconds. Subsequent stuns are less effective so the entity is not perma-stunned

    Parameters

    • seconds: any

    Returns void

Static getCachedSchema

  • getCachedSchema(): any

Static getId

  • getId(): string
  • Returns string

Static getSchema

  • getSchema(): object

Static verify

  • verify(data: any): string