API / EventObject
Class: EventObject
Defined in: event/EventObject.ts:38
The properties of the object carry basic information about an event, which are passed as parameter or parameter's parameter to event listeners when an event occurs.
Extends
Constructors
Constructor
new EventObject(): EventObject;
Returns
EventObject
Inherited from
Properties
animationState
animationState: AnimationState;
Defined in: event/EventObject.ts:199
The animation state that dispatch the event.
armature
armature: Armature;
Defined in: event/EventObject.ts:172
The armature that dispatch the event.
bone
bone: Bone;
Defined in: event/EventObject.ts:181
The bone that dispatch the event.
data
data: UserData;
Defined in: event/EventObject.ts:215
The custom data.
hashCode
readonly hashCode: number;
Defined in: core/BaseObject.ts:156
A unique identification number assigned to the object.
Inherited from
name
name: string;
Defined in: event/EventObject.ts:163
The event name. (The frame event name or the frame sound name)
slot
slot: Slot;
Defined in: event/EventObject.ts:190
The slot that dispatch the event.
time
time: number;
Defined in: event/EventObject.ts:147
If is a frame event, the value is used to describe the time that the event was in the animation timeline. (In seconds)
type
type: EventStringType;
Defined in: event/EventObject.ts:155
The event type。
COMPLETE
readonly static COMPLETE: "complete" = "complete";
Defined in: event/EventObject.ts:62
Animation play complete.
FADE_IN
readonly static FADE_IN: "fadeIn" = "fadeIn";
Defined in: event/EventObject.ts:70
Animation fade in start.
FADE_IN_COMPLETE
readonly static FADE_IN_COMPLETE: "fadeInComplete" = "fadeInComplete";
Defined in: event/EventObject.ts:78
Animation fade in complete.
FADE_OUT
readonly static FADE_OUT: "fadeOut" = "fadeOut";
Defined in: event/EventObject.ts:86
Animation fade out start.
FADE_OUT_COMPLETE
readonly static FADE_OUT_COMPLETE: "fadeOutComplete" = "fadeOutComplete";
Defined in: event/EventObject.ts:94
Animation fade out complete.
FRAME_EVENT
readonly static FRAME_EVENT: "frameEvent" = "frameEvent";
Defined in: event/EventObject.ts:102
Animation frame event.
LOOP_COMPLETE
readonly static LOOP_COMPLETE: "loopComplete" = "loopComplete";
Defined in: event/EventObject.ts:54
Animation loop play complete once.
SOUND_EVENT
readonly static SOUND_EVENT: "soundEvent" = "soundEvent";
Defined in: event/EventObject.ts:110
Animation frame sound event.
START
readonly static START: "start" = "start";
Defined in: event/EventObject.ts:46
Animation start play.
Methods
returnToPool()
returnToPool(): void;
Defined in: core/BaseObject.ts:167
Clear the object and return it back to object pool。
Returns
void
Inherited from
borrowObject()
static borrowObject<T>(objectConstructor: () => T): T;
Defined in: core/BaseObject.ts:136
Get an instance of the specify class from object pool.
Type Parameters
Type Parameter |
---|
T extends BaseObject |
Parameters
Parameter | Type | Description |
---|---|---|
objectConstructor | () => T | The specify class. |
Returns
T
Inherited from
clearPool()
static clearPool(objectConstructor: typeof BaseObject): void;
Defined in: core/BaseObject.ts:111
Clear the cached instances of a specify object pool.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
objectConstructor | typeof BaseObject | null | Specify class. (Clear all cached instances if not set) |
Returns
void
Inherited from
setMaxCount()
static setMaxCount(objectConstructor: typeof BaseObject, maxCount: number): void;
Defined in: core/BaseObject.ts:72
Set the maximum cache count of the specify object pool.
Parameters
Parameter | Type | Description |
---|---|---|
objectConstructor | typeof BaseObject | The specify class. (Set all object pools max cache count if not set) |
maxCount | number | Max count. |
Returns
void
Inherited from
toString()
static toString(): string;
Defined in: event/EventObject.ts:137
Returns
string