Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Sprite_Battler


Sprite_Battler

The superclass of Sprite_Actor and Sprite_Enemy.

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _anchor

Protected _animationSprites

_animationSprites: Array<Sprite_Animation>

The animation sprites assigned to the sprite object.

type

{Array}

memberof

Sprite_Base

Protected _battler

_battler: Game_Battler

Protected _bitmap

_bitmap: Bitmap

Protected _blendColor

_blendColor: Array<Number>

Protected _bounds

_bounds: Bounds

Protected _boundsID

_boundsID: number

Protected _boundsRect

_boundsRect: Rectangle

Protected _cacheAsBitmap

_cacheAsBitmap: boolean

Protected _cacheData

_cacheData: boolean

Protected _canvas

_canvas: HTMLCanvasElement

Protected _colorTone

_colorTone: Array<Number>

Protected _context

_context: CanvasRenderingContext2D

Protected _damages

_damages: Array<Sprite_Damage>

Protected _destroyed

_destroyed: boolean

Protected _effectTarget

_effectTarget: Sprite_Base

The target that will have the animations applied to it.

type

{Sprite_Base}

memberof

Sprite_Base

Protected _enabledFilters

_enabledFilters: Filter[] | null

Protected _filters

_filters: Filter[] | null

Protected _frame

_frame: Rectangle

Protected _height

_height: number

Protected _hiding

_hiding: boolean

Property determining the sprite's visibility.

type

{boolean}

memberof

Sprite_Base

Protected _homeX

_homeX: number

Protected _homeY

_homeY: number

Private _isPicture

_isPicture: boolean

use heavy renderer that will reduce border artifacts and apply advanced blendModes

type

{boolean}

Protected _lastBoundsID

_lastBoundsID: number

Protected _localBoundsRect

_localBoundsRect: Rectangle

Protected _mask

_mask: Graphics | Sprite

Protected _movementDuration

_movementDuration: number

Protected _offset

_offset: Point

Protected _offsetX

_offsetX: number

Protected _offsetY

_offsetY: number

Protected _realFrame

_realFrame: Rectangle

Protected _selectionEffectCount

_selectionEffectCount: number

Protected _targetOffsetX

_targetOffsetX: number

Protected _targetOffsetY

_targetOffsetY: number

Protected _texture

_texture: Texture

Protected _textureID

_textureID: number

Protected _textureTrimmedID

_textureTrimmedID: number

Protected _tint

_tint: number

Protected _tintRGB

_tintRGB: number

Protected _tintTexture

_tintTexture: BaseTexture

Protected _transformID

_transformID: number

Protected _transformTrimmedID

_transformTrimmedID: number

Protected _width

_width: number

accessible

accessible: boolean

accessibleHint

accessibleHint: string | null

accessibleTitle

accessibleTitle: string | null

alpha

alpha: number

anchor

bitmap

bitmap: Bitmap

The image for the sprite.

property

bitmap

type

Bitmap

blendMode

blendMode: number

The blend mode to be applied to the sprite.

property

blendMode

type

Number

buttonMode

buttonMode: boolean

cacheAsBitmap

cacheAsBitmap: boolean

Protected cachedTint

cachedTint: number

children

children: Array<DisplayObject>

[read-only] The array of children of the sprite.

property

children

type

Array

cursor

cursor: string

defaultCursor

defaultCursor: string

filterArea

filterArea: Rectangle

filters

filters: Array<Filter>

Sets the filters for the sprite.

property

filters

type

Array

height

height: number

The height of the sprite without the scale.

property

height

type

Number

hitArea

interactive

interactive: boolean

interactiveChildren

interactiveChildren: boolean

localTransform

localTransform: Matrix

mask

name

name: string | null

Protected onChildrenChange

onChildrenChange: function

Type declaration

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

      • Rest ...args: any[]

      Returns void

opacity

opacity: number

The opacity of the sprite (0 to 255).

property

opacity

type

Number

opaque

opaque: boolean

parent

parent: Container

[read-only] The object that contains the sprite.

property

parent

type

PIXI.DisplayObjectContainer

pivot

pluginName

pluginName: string

point

point: Point

The origin point of the sprite. (0,0) to (1,1).

property

anchor

type

Point

position

renderable

renderable: boolean

rotation

rotation: number

The rotation of the sprite in radians.

property

rotation

type

Number

scale

scale: Point

The scale factor of the sprite.

property

scale

type

Point

skew

spriteId

spriteId: number

tabIndex

tabIndex: number

texture

texture: Texture

Protected textureDirty

textureDirty: boolean

tint

tint: number

transform

transform: TransformBase

vertexData

vertexData: Float32Array

Protected vertexTrimmedData

vertexTrimmedData: Float32Array

visible

visible: boolean

The visibility of the sprite.

property

visible

type

Boolean

voidFilter

voidFilter: Filter

width

width: number

The width of the sprite without the scale.

property

width

type

Number

worldAlpha

worldAlpha: number

worldTransform

worldTransform: Matrix

worldVisible

worldVisible: boolean

x

x: number

The x coordinate of the sprite.

property

x

type

Number

y

y: number

The y coordinate of the sprite.

property

y

type

Number

Static EventEmitter

EventEmitter: object

Type declaration

  • constructor: function
    • Returns EventEmitter

  • prefixed: string | boolean

Static _counter

_counter: number

Number of the created objects.

static
property

_counter

type

Number

Static prefixed

prefixed: string | boolean

Methods

Protected _cacheAsBitmapDestroy

  • _cacheAsBitmapDestroy(options: boolean | any): void

Protected _calculateBounds

  • _calculateBounds(): void

Protected _calculateCachedBounds

Private _createTinter

  • _createTinter(w: number, h: number): void

Protected _destroyCachedDisplayObject

  • _destroyCachedDisplayObject(): void

Private _executeTint

  • _executeTint(x: number, y: number, w: number, h: number): void

Protected _getCachedLocalBounds

Protected _initCachedDisplayObject

Protected _initCachedDisplayObjectCanvas

Private _isInBitmapRect

  • _isInBitmapRect(x: number, y: number, w: number, h: number): boolean

Private _needsTint

  • _needsTint(): boolean

Private _onBitmapLoad

  • _onBitmapLoad(): void

Protected _onTextureUpdate

  • _onTextureUpdate(): void

Protected _recursivePostUpdateTransform

  • _recursivePostUpdateTransform(): void

Private _refresh

  • _refresh(): void

Protected _renderCachedCanvas

Protected _renderCachedWebGL

Private _renderCanvas

Private _renderCanvas_PIXI

Private _renderWebGL

Private _renderWebGL_PIXI

Private _speedUpCustomBlendModes

addChild

addChildAt

addListener

calculateBounds

  • calculateBounds(): void

Protected calculateTrimmedVertices

  • calculateTrimmedVertices(): void

calculateVertices

  • calculateVertices(): void

Protected containerUpdateTransform

  • containerUpdateTransform(): void

containsPoint

  • containsPoint(point: Point): boolean
  • Parameters

    Returns boolean

damageOffsetX

  • damageOffsetX(): number

damageOffsetY

  • damageOffsetY(): number

destroy

Protected displayObjectUpdateTransform

  • displayObjectUpdateTransform(): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Calls each of the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • Rest ...args: any[]

      Arguments that are passed to registered listeners

    Returns boolean

    true if the event had listeners, else false.

eventNames

  • eventNames(): Array<string | symbol>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<string | symbol>

getBlendColor

  • getBlendColor(): Array<number>

getBounds

getChildAt

getChildByName

getChildIndex

getColorTone

  • getColorTone(): Array<number>

getGlobalPosition

  • getGlobalPosition(point?: Point, skipUpdate?: boolean): Point

getLocalBounds

hide

  • hide(): void

inHomePosition

  • inHomePosition(): boolean

initMembers

  • initMembers(): void

isAnimationPlaying

  • isAnimationPlaying(): boolean

isEffecting

  • isEffecting(): boolean

isMoving

  • isMoving(): boolean

listeners

  • listeners(event: string | symbol): Function[]
  • listeners(event: string | symbol, exists: boolean): boolean
  • Return the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    Returns Function[]

  • Check if there listeners for a given event. If exists argument is not true lists listeners.

    Parameters

    • event: string | symbol

      The event name.

    • exists: boolean

      Only check if there are listeners.

    Returns boolean

move

  • move(x: number, y: number): void
  • Sets the x and y at once.

    method

    move

    Parameters

    • x: number

      The x coordinate of the sprite

    • y: number

      The y coordinate of the sprite

    Returns void

off

  • off(event: "added" | "removed" | string, fn?: Function, context?: any): this
  • Parameters

    • event: "added" | "removed" | string
    • Optional fn: Function
    • Optional context: any

    Returns this

on

  • on(event: "added" | "removed", fn: function, context?: any): this
  • on(event: string, fn: Function, context?: any): this
  • Parameters

    • event: "added" | "removed"
    • fn: function
    • Optional context: any

    Returns this

  • Parameters

    • event: string
    • fn: Function
    • Optional context: any

    Returns this

Protected onAnchorUpdate

  • onAnchorUpdate(): void
  • Returns void

onMoveEnd

  • onMoveEnd(): void

once

  • once(event: "added" | "removed", fn: function, context?: any): this
  • once(event: string, fn: Function, context?: any): this
  • Parameters

    • event: "added" | "removed"
    • fn: function
    • Optional context: any

    Returns this

  • Parameters

    • event: string
    • fn: Function
    • Optional context: any

    Returns this

removeAllListeners

removeChild

removeChildAt

removeChildren

  • removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[]
  • Parameters

    • Optional beginIndex: number
    • Optional endIndex: number

    Returns DisplayObject[]

removeListener

renderAdvancedWebGL

renderCanvas

renderWebGL

setBattler

setBlendColor

  • setBlendColor(color: Array<number>): void

setChildIndex

setColorTone

  • setColorTone(tone: Array<number>): void

setFrame

  • setFrame(x: number, y: number, width: number, height: number): void
  • Sets the rectagle of the bitmap that the sprite displays.

    method

    setFrame

    Parameters

    • x: number

      The x coordinate of the frame

    • y: number

      The y coordinate of the frame

    • width: number

      The width of the frame

    • height: number

      The height of the frame

    Returns void

setHome

  • setHome(x: number, y: number): void
  • Sets the home position of the sprite battler to the given x and y coordinates.

    memberof

    Sprite_Battler

    Parameters

    • x: number
    • y: number

    Returns void

setMaxListeners

  • setMaxListeners(): this
  • This function doesn't apply anymore.

    deprecated

    Returns this

setParent

setTransform

  • setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): DisplayObject
  • Parameters

    • Optional x: number
    • Optional y: number
    • Optional scaleX: number
    • Optional scaleY: number
    • Optional rotation: number
    • Optional skewX: number
    • Optional skewY: number
    • Optional pivotX: number
    • Optional pivotY: number

    Returns DisplayObject

setupAnimation

  • setupAnimation(): void

setupDamagePopup

  • setupDamagePopup(): void

show

  • show(): void

startAnimation

  • startAnimation(animation: Animation, mirror: boolean, delay: number): void

startMove

  • startMove(x: number, y: number, duration: number): void

swapChildren

toGlobal

toLocal

trackedPointers

  • trackedPointers(): object

update

  • update(): void

updateAnimation

  • updateAnimation(): void

updateAnimationSprites

  • updateAnimationSprites(): void

updateBitmap

  • updateBitmap(): void

updateDamagePopup

  • updateDamagePopup(): void

updateFrame

  • updateFrame(): void

updateMain

  • updateMain(): void

updateMove

  • updateMove(): void

updatePosition

  • updatePosition(): void

updateSelectionEffect

  • updateSelectionEffect(): void

Private updateTransform

  • updateTransform(): void

updateVisibility

  • updateVisibility(): void

Static from

  • from(source: number | string | BaseTexture | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): Sprite
  • Parameters

    • source: number | string | BaseTexture | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement

    Returns Sprite

Static fromFrame

  • fromFrame(frameId: string): Sprite
  • Parameters

    • frameId: string

    Returns Sprite

Static fromImage

  • fromImage(imageId: string, crossorigin?: boolean, scaleMode?: number): Sprite
  • Parameters

    • imageId: string
    • Optional crossorigin: boolean
    • Optional scaleMode: number

    Returns Sprite

Generated using TypeDoc