Class: Sprite_Character

Sprite_Character(character)

new Sprite_Character(character)

The sprite for displaying a character.
Parameters:
Name Type Description
character Game_Character
Properties:
Name Type Description
_character Game_Character The Game_Character object assigned to the sprite.
_balloonDuration Number
_tilesetId Number
_upperBody Sprite
_lowerBody Sprite
_bushDepth Number
_balloonSprite Sprite_Balloon The current balloon sprite assigned to the sprite.

Extends

Methods

characterBlockX() → {Number}

Returns:
Type
Number

characterBlockY() → {Number}

Returns:
Type
Number

characterPatternX() → {Number}

Returns the character x pattern.
Returns:
Type
Number

characterPatternY() → {Number}

Returns the character y pattern.
Returns:
Type
Number

createHalfBodySprites()

endBalloon()

Ends the balloon sprite, removing it from the Game_Character object sprite.

hide()

Hides the sprite.
Inherited From:

initialize(character)

Creates an instance of Sprite_Character.
Parameters:
Name Type Description
character Game_Character
Overrides:

initMembers()

isAnimationPlaying() → {boolean}

Returns true if an animation is currently playing.
Inherited From:
Returns:
Type
boolean

isBalloonPlaying() → {boolean}

Returns true if a balloon animation is playing on the character.
Returns:
Type
boolean

isImageChanged() → {Boolean}

Returns true if the sprite character image has changed.
Returns:
Type
Boolean

isTile() → {boolean}

Returns true if the Game_Character object tileId is greater than 0.
Returns:
Type
boolean

patternHeight() → {Number}

Returns the pattern height.
Returns:
Type
Number

patternWidth() → {Number}

Returns the pattern width.
Returns:
Type
Number

setCharacter(character)

Sets the current Game_Character object attached to the sprite.
Parameters:
Name Type Description
character Game_Character

setCharacterBitmap()

Sets the sprite character bitmap.

setTileBitmap()

setupAnimation()

setupBalloon()

Sets up the Game_Character object balloon sprite, and calls the startBalloon method.

show()

Shows the sprite.
Inherited From:

startAnimation(animation, mirror, delay)

Starts a new animation on the current sprite by assigning a new Sprite_Animation object to the sprite's parent.
Parameters:
Name Type Description
animation RPG.Animation
mirror Boolean
delay Number
Inherited From:

startBalloon()

Starts the balloon sprite on the Game_Character object.

tilesetBitmap(tileId) → {Bitmap}

Parameters:
Name Type Description
tileId Number
Returns:
Type
Bitmap

update()

Overrides:

updateAnimation()

updateAnimationSprites()

Updates the animation sprites, cloning them; if the sprite is playing, pushes the sprites into animation sprites, otherwise the sprite is removed.
Inherited From:

updateBalloon()

Processes the balloon sprite, calls the endBaloon method if the balloon sprite is done playing.

updateBitmap()

Updates the bitmap of the sprite character.

updateCharacterFrame()

Updates the sprite character -- character frame.

updateFrame()

Updates the sprite character frame.

updateHalfBodySprites()

updateOther()

updatePosition()

Updates the position of the sprite character.

updateTileFrame()

Updates the sprite character tile frame.

updateVisibility()

Overrides: