Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Script

Hierarchy

Index

Constructors

constructor

Events

Optional onAwake

  • onAwake(): void
  • Returns void

Optional onClick

  • onClick(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onCollisionEnter

  • onCollisionEnter(collision: default): void
  • Parameters

    • collision: default

    Returns void

Optional onCollisionExit

  • onCollisionExit(collision: default): void
  • Parameters

    • collision: default

    Returns void

Optional onCollisionStay

  • onCollisionStay(collision: default): void
  • Parameters

    • collision: default

    Returns void

Optional onControllerColliderHit

  • onControllerColliderHit(hit: default): void
  • Parameters

    • hit: default

    Returns void

Optional onDestroy

  • onDestroy(): void
  • Returns void

Optional onDisable

  • onDisable(): void
  • Returns void

Optional onEnable

  • onEnable(): void
  • Returns void

Optional onFixedUpdate

  • onFixedUpdate(): void
  • Returns void

Optional onKeyboardComplete

  • Parameters

    Returns void

Optional onKeyboardConfirm

  • Parameters

    Returns void

Optional onKeyboardInput

  • Parameters

    Returns void

Optional onKeyboardShow

  • Parameters

    Returns void

Optional onLateUpdate

  • onLateUpdate(dt?: number): void
  • Parameters

    • Optional dt: number

    Returns void

Optional onStart

  • onStart(): void
  • Returns void

Optional onTouchCancel

  • onTouchCancel(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchEnd

  • onTouchEnd(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchEnter

  • onTouchEnter(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchLeave

  • onTouchLeave(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchMove

  • onTouchMove(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchOut

  • onTouchOut(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchOver

  • onTouchOver(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchStart

  • onTouchStart(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTouchUp

  • onTouchUp(comp: TouchInputComponent, event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>): void
  • Parameters

    • comp: TouchInputComponent
    • event: Readonly<{ allowThrough: boolean; originalEvent: TouchEvent; touches: DeepImmutableArray<TouchPoint>; type: TouchEventNames; stopTouchThrough: any }>

    Returns void

Optional onTriggerEnter

  • onTriggerEnter(collision: default): void
  • Parameters

    • collision: default

    Returns void

Optional onTriggerExit

  • onTriggerExit(collision: default): void
  • Parameters

    • collision: default

    Returns void

Optional onTriggerStay

  • onTriggerStay(collision: default): void
  • Parameters

    • collision: default

    Returns void

Optional onUpdate

  • onUpdate(dt?: number): void
  • Parameters

    • Optional dt: number

    Returns void

Properties

Readonly entity

entity: Entity

Readonly id

id: number = ...

Readonly isDestroyed

isDestroyed: boolean = false

Readonly isDestroying

isDestroying: boolean = false

Readonly priority

priority: number = 0

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

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

Methods

addComponent

  • Type parameters

    Parameters

    Returns T

destroy

  • destroy(): void
  • Returns void

getComponent

  • Type parameters

    Parameters

    Returns T

getComponents

  • getComponents<T>(ctor: typeof Component): T[]
  • Type parameters

    Parameters

    Returns T[]

getTypeName

  • getTypeName(): string

isDetached

  • isDetached(): boolean
  • Returns boolean

removeComponent

  • Parameters

    Returns void

resetProperties

  • resetProperties(): void

Generated using TypeDoc