Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UIAnchor

TODO what if a entity2d is moved to another UI tree from one UI tree.

Hierarchy

Index

Constructors

constructor

Properties

Readonly entity

entity: Entity2D

Readonly id

id: number = ...

Readonly isDestroyed

isDestroyed: boolean = false

Readonly isDestroying

isDestroying: boolean = false

Readonly priority

priority: number = ...

Static Execute

Execute: Readonly<typeof Execute> = ...

更新运算的时机的枚举值,对应不同的组件生命周期。

static
memberof

UIAnchor

Static Priority

Priority: { Align: number; Layout: number; Low: number; Physics: number; Render: number; Tool: number } = ...

Type declaration

  • Align: number
  • Layout: number
  • Low: number
  • Physics: number
  • Render: number
  • Tool: number

Static Optional Serialize

Serialize: (...args: any[]) => any

Type declaration

    • (...args: any[]): any
    • Parameters

      • Rest ...args: any[]

      Returns any

Static Side

Side: Readonly<typeof Side> = ...

UIAnchor对齐方式的枚举类型

static
memberof

UIAnchor

Accessors

active

  • get active(): boolean
  • set active(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

activeInHierarchy

  • get activeInHierarchy(): boolean
  • 在场景树中是否active

    readonly
    memberof

    Component

    Returns boolean

execute

  • get execute(): Execute
  • set execute(val: Execute): void
  • Execute类型,组件属性或目标关联属性发生变化后,具体进行更新运算的时机。

    memberof

    UIAnchor

    Returns Execute

  • Execute类型,组件属性或目标关联属性发生变化后,具体进行更新运算的时机。

    Parameters

    • val: Execute

    Returns void

pixelOffset

  • 默认值为0,水平垂直方向的绝对偏移

    memberof

    UIAnchor

    Returns Vector2

  • 默认值为0,水平垂直方向的绝对偏移

    Parameters

    Returns void

relativeOffset

  • get relativeOffset(): Vector2
  • set relativeOffset(val: Vector2): void
  • 默认值Vectotr2.Zero(),相对于组件所在的UICanvas大小,水平垂直方向的相对偏移,每个方向取值范围(0-1)

    memberof

    UIAnchor

    Returns Vector2

  • 默认值Vectotr2.Zero(),相对于组件所在的UICanvas大小,水平垂直方向的相对偏移,每个方向取值范围(0-1)

    Parameters

    Returns void

side

  • get side(): Side
  • set side(val: Side): void
  • Side类型,相对于UICanvas的对齐位置

    memberof

    UIAnchor

    Returns Side

  • Side类型,相对于UICanvas的对齐位置

    Parameters

    • val: Side

    Returns void

Methods

destroy

  • destroy(): void
  • Returns void

getTypeName

  • getTypeName(): string

isDetached

  • isDetached(): boolean
  • Returns boolean

resetProperties

  • resetProperties(): void

updateUIAnchor

  • updateUIAnchor(): void
  • 立即重新进行一次UIAnchor的对齐

    memberof

    UIAnchor

    Returns void

Generated using TypeDoc