Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Methods

  • activate(enable: boolean): void
  • De/Activate the behavior

    Parameters

    • enable: boolean

      true to enable the behavior, false to disable it

    Returns void

  • activated(): boolean
  • addObjectAngleTween(identifier: string, toAngle: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object angle.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toAngle: number

      The target angle

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectColorHSLTween(identifier: string, toHue: number, animateHue: boolean, toSaturation: number, toLightness: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object HSL color, with the "to" color given using HSL (H: any number, S and L: 0-100).

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toHue: number

      The target hue, or the same as the from color's hue if blank

    • animateHue: boolean
    • toSaturation: number

      The target saturation, or the same as the from color's saturation if blank

    • toLightness: number
    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectColorTween(identifier: string, toColorStr: string, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean, useHSLColorTransition: boolean): void
  • Tween an object color.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toColorStr: string

      The target RGB color (format "128;200;255" with values between 0 and 255 for red, green and blue)

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    • useHSLColorTransition: boolean

      Tween using HSL color mappings, rather than direct RGB line

    Returns void

  • addObjectDepthTween(identifier: string, toDepth: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object depth.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toDepth: number

      The target depth

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectHeightTween(identifier: string, toHeight: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object height.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toHeight: number

      The target height

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectOpacityTween(identifier: string, toOpacity: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object opacity.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toOpacity: number

      The target opacity

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectPositionTween(identifier: string, toX: number, toY: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object position.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toX: number

      The target X position

    • toY: number

      The target Y position

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectPositionXTween(identifier: string, toX: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object X position.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toX: number

      The target X position

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectPositionYTween(identifier: string, toY: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object Y position.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toY: number

      The target Y position

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectPositionZTween(identifier: string, toZ: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object Z position.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toZ: number

      The target Z position

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addObjectScaleTween(identifier: string, toScaleX: number, toScaleY: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean, scaleFromCenterOfObject: boolean): void
  • Tween an object scale.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toScaleX: number

      The target X-scale

    • toScaleY: number

      The target Y-scale

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    • scaleFromCenterOfObject: boolean

      Scale the transform from the center of the object (or point that is called center), not the top-left origin

    Returns void

  • addObjectScaleXTween(identifier: string, toScaleX: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean, scaleFromCenterOfObject: boolean): void
  • Tween an object X-scale.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toScaleX: number

      The target X-scale

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    • scaleFromCenterOfObject: boolean

      Scale the transform from the center of the object (or point that is called center), not the top-left origin

    Returns void

  • addObjectScaleYTween(identifier: string, toScaleY: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean, scaleFromCenterOfObject: boolean): void
  • Tween an object Y-scale.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toScaleY: number

      The target Y-scale

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    • scaleFromCenterOfObject: boolean

      Scale the transform from the center of the object (or point that is called center), not the top-left origin

    Returns void

  • addObjectWidthTween(identifier: string, toWidth: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object width.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toWidth: number

      The target width

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addTextObjectCharacterSizeTween(identifier: string, toSize: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween a text object character size.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • toSize: number

      The target character size

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addVariableTween(identifier: string, variable: Variable, fromValue: number, toValue: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Add an object variable tween.

    deprecated

    Use addVariableTween2 instead. This function is misleading since one could think that the tween starts right at the moment this function is called whereas the value of the variable will change at the next frame only. Moreover, the variable will not start from the start value exactly since time will have passed at the moment the next frame is rendered. See https://github.com/4ian/GDevelop/issues/4270

    Parameters

    • identifier: string

      Unique id to identify the tween

    • variable: Variable

      The object variable to store the tweened value

    • fromValue: number

      Start value

    • toValue: number

      End value

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • addVariableTween2(identifier: string, variable: Variable, toValue: number, easingValue: string, durationValue: number, destroyObjectWhenFinished: boolean): void
  • Tween an object variable.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • variable: Variable

      The object variable to store the tweened value

    • toValue: number

      End value

    • easingValue: string

      Type of easing

    • durationValue: number

      Duration in milliseconds

    • destroyObjectWhenFinished: boolean

      Destroy this object when the tween ends

    Returns void

  • exists(identifier: string): boolean
  • Tween exists.

    Parameters

    • identifier: string

      Unique id to identify the tween

    Returns boolean

    The tween exists

  • getName(): string
  • getNameId(): number
  • Get the name identifier of the behavior.

    Returns number

    The behavior's name identifier.

  • getProgress(identifier: string): number
  • Get tween progress.

    Parameters

    • identifier: string

      Unique id to identify the tween

    Returns number

    Progress of playing tween animation (between 0.0 and 1.0)

  • hasFinished(identifier: string): boolean
  • Tween has finished.

    Parameters

    • identifier: string

      Unique id to identify the tween

    Returns boolean

  • isPlaying(identifier: string): boolean
  • Tween is playing.

    Parameters

    • identifier: string

      Unique id to identify the tween

    Returns boolean

  • onActivate(): void
  • Reimplement this method to do extra work when the behavior is activated (after it has been deactivated, see onDeActivate).

    Returns void

  • onCreated(): void
  • Reimplement this to do extra work when the behavior is created (i.e: an object using it was created), after the object is fully initialized (so you can use this.owner without risk).

    Returns void

  • onDeActivate(): void
  • onDestroy(): void
  • This method is called when the owner of the behavior is being removed from the scene and is about to be destroyed/reused later or when the behavior is removed from an object (can happen in case of hot-reloading only. Otherwise, behaviors are just de-activated, not removed. See onDeActivate).

    Returns void

  • onObjectHotReloaded(): void
  • This method is called when the owner of the behavior was hot reloaded, so its position, angle, size can have been changed outside of events.

    Returns void

  • pauseTween(identifier: string): void
  • Pause a tween.

    Parameters

    • identifier: string

      Unique id to identify the tween

    Returns void

  • removeTween(identifier: string): void
  • Remove a tween.

    Parameters

    • identifier: string

      Unique id to identify the tween

    Returns void

  • resumeTween(identifier: string): void
  • Resume a tween.

    Parameters

    • identifier: string

      Unique id to identify the tween

    Returns void

  • Called at each frame after events. Call doStepPostEvents.
    Behaviors writers: Please do not redefine this method. Redefine doStepPreEvents instead.

    Parameters

    Returns void

  • Called at each frame before events. Call doStepPreEvents.
    Behaviors writers: Please do not redefine this method. Redefine doStepPreEvents instead.

    Parameters

    Returns void

  • stopTween(identifier: string, jumpToDest: boolean): void
  • Stop a tween.

    Parameters

    • identifier: string

      Unique id to identify the tween

    • jumpToDest: boolean

      Move to destination

    Returns void

  • updateFromBehaviorData(oldBehaviorData: BehaviorData, newBehaviorData: BehaviorData): boolean
  • Called when the behavior must be updated using the specified behaviorData. This is the case during hot-reload, and is only called if the behavior was modified.

    Parameters

    • oldBehaviorData: BehaviorData
    • newBehaviorData: BehaviorData

    Returns boolean

    true if the behavior was updated, false if it could not (i.e: hot-reload is not supported).

Constructors

Properties

easings: string[] = ...
name: string
type: string

Generated using TypeDoc