Sprite_Actor ⇐ Sprite_Battler
Sprite_Actor
Kind: global class
Extends: Sprite_Battler
- Sprite_Actor ⇐
Sprite_Battler
- new Sprite_Actor()
- .MOTIONS :
Object
- .initialize(battler)
- .initMembers()
- .createMainSprite()
- .createShadowSprite()
- .createWeaponSprite()
- .createStateSprite()
- .setBattler(battler)
- .moveToStartPosition()
- .setActorHome(index)
- .update()
- .updateShadow()
- .updateMain()
- .setupMotion()
- .setupWeaponAnimation()
- .startMotion(motionType)
- .updateTargetPosition()
- .updateBitmap()
- .updateFrame()
- .updateMove()
- .updateMotion()
- .updateMotionCount()
- .motionSpeed() ⇒
Number
- .refreshMotion()
- .startEntryMotion()
- .stepForward()
- .stepBack()
- .retreat()
- .onMoveEnd()
- .damageOffsetX() ⇒
Number
- .damageOffsetY() ⇒
Number
new Sprite_Actor()
角色精灵类
Actor sprite class
Sprite_Actor.MOTIONS : Object
动作常量定义
Motion constants definition
Kind: static property of Sprite_Actor
Properties
Name | Type | Description |
---|---|---|
walk | Object | 行走动作 Walk motion |
wait | Object | 待机动作 Wait motion |
chant | Object | 吟唱动作 Chant motion |
guard | Object | 防御动作 Guard motion |
damage | Object | 受伤动作 Damage motion |
evade | Object | 躲避动作 Evade motion |
thrust | Object | 突刺动作 Thrust motion |
swing | Object | 挥舞动作 Swing motion |
missile | Object | 飞行道具动作 Missile motion |
skill | Object | 技能动作 Skill motion |
spell | Object | 魔法动作 Spell motion |
item | Object | 物品动作 Item motion |
escape | Object | 逃跑动作 Escape motion |
victory | Object | 胜利动作 Victory motion |
dying | Object | 频死动作 Dying motion |
abnormal | Object | 状态异常动作 Abnormal motion |
sleep | Object | 睡眠动作 Sleep motion |
dead | Object | 死亡动作 Dead motion |
Sprite_Actor.initialize(battler)
初始化角色精灵
Initialize actor sprite
Kind: static method of Sprite_Actor
Param | Type | Description |
---|---|---|
battler | Game_Actor | 角色战斗器 - Actor battler |
Sprite_Actor.initMembers()
初始化成员变量
Initialize member variables
Kind: static method of Sprite_Actor
Sprite_Actor.createMainSprite()
创建主精灵
Create main sprite
Kind: static method of Sprite_Actor
Sprite_Actor.createShadowSprite()
创建影子精灵
Create shadow sprite
Kind: static method of Sprite_Actor
Sprite_Actor.createWeaponSprite()
创建武器精灵
Create weapon sprite
Kind: static method of Sprite_Actor
Sprite_Actor.createStateSprite()
创建状态精灵
Create state sprite
Kind: static method of Sprite_Actor
Sprite_Actor.setBattler(battler)
设置战斗者
Set battler
Kind: static method of Sprite_Actor
Param | Type | Description |
---|---|---|
battler | Game_Actor | 角色战斗者 - Actor battler |
Sprite_Actor.moveToStartPosition()
移动到开始位置
Move to start position
Kind: static method of Sprite_Actor
Sprite_Actor.setActorHome(index)
设置角色位置
Set actor home position
Kind: static method of Sprite_Actor
Param | Type | Description |
---|---|---|
index | Number | 角色索引 - Actor index |
Sprite_Actor.update()
更新精灵
Update sprite
Kind: static method of Sprite_Actor
Sprite_Actor.updateShadow()
更新影子
Update shadow
Kind: static method of Sprite_Actor
Sprite_Actor.updateMain()
更新主函数
Update main
Kind: static method of Sprite_Actor
Sprite_Actor.setupMotion()
设置动作
Setup motion
Kind: static method of Sprite_Actor
Sprite_Actor.setupWeaponAnimation()
设置武器动画
Setup weapon animation
Kind: static method of Sprite_Actor
Sprite_Actor.startMotion(motionType)
开始动作
Start motion
Kind: static method of Sprite_Actor
Param | Type | Description |
---|---|---|
motionType | String | 动作类型 - Motion type |
Sprite_Actor.updateTargetPosition()
更新目标位置
Update target position
Kind: static method of Sprite_Actor
Sprite_Actor.updateBitmap()
更新位图
Update bitmap
Kind: static method of Sprite_Actor
Sprite_Actor.updateFrame()
更新帧
Update frame
Kind: static method of Sprite_Actor
Sprite_Actor.updateMove()
更新移动
Update move
Kind: static method of Sprite_Actor
Sprite_Actor.updateMotion()
更新动作
Update motion
Kind: static method of Sprite_Actor
Sprite_Actor.updateMotionCount()
更新动作计数
Update motion count
Kind: static method of Sprite_Actor
Sprite_Actor.motionSpeed() ⇒ Number
获取动作速度
Get motion speed
Kind: static method of Sprite_Actor
Returns: Number
- 动作速度 - Motion speed
Sprite_Actor.refreshMotion()
刷新动作
Refresh motion
Kind: static method of Sprite_Actor
Sprite_Actor.startEntryMotion()
开始进入动作
Start entry motion
Kind: static method of Sprite_Actor
Sprite_Actor.stepForward()
踏步向前
Step forward
Kind: static method of Sprite_Actor
Sprite_Actor.stepBack()
踏步向后
Step back
Kind: static method of Sprite_Actor
Sprite_Actor.retreat()
撤退
Retreat
Kind: static method of Sprite_Actor
Sprite_Actor.onMoveEnd()
当移动结束
On move end
Kind: static method of Sprite_Actor
Sprite_Actor.damageOffsetX() ⇒ Number
伤害显示 X 偏移
Damage offset X
Kind: static method of Sprite_Actor
Returns: Number
- X 偏移值 - X offset value
Sprite_Actor.damageOffsetY() ⇒ Number
伤害显示 Y 偏移
Damage offset Y
Kind: static method of Sprite_Actor
Returns: Number
- Y 偏移值 - Y offset value