RPGJS 进阶分析之 Rpg Class

本文详细介绍了游戏开发中常用的核心函数及其应用场景,包括动画、动作、地图、事件、音乐等功能的实现方法。通过这些函数,开发者可以更好地控制游戏内元素的行为,提升游戏体验。
//动画相关函数
//Sets the size of a pattern animation
setGraphicAnimation
addAnimation
//动作相关函数
//Add Action. The player can make an action when pressed a button and changing the appearance of the hero. Events can have a share. For example, you can specify that gives the hero a sword when the A button is pressed
addAction
//战斗相关函数
battleFormulas
battleEffect
//Map相关函数
mapFreeze
prepareMap
getPreparedMap
setPreparedMap
callMap
clearMap
displayMap
loadMap
refreshMap
//事件相关函数
getEventById
getEventByName
getEventByPosition
_getEvent
removeEvent
addEvent
addEventAjax
addEventPrepared
getEventPreparedByName
setEventPrepared
prepareEvent
prepareEventAjax
//Call commands event of an event
callCommandsEvent
//Refresh events. Helps restore the properties of the right page in the event
eventsRefresh
//Assigns a function to trigger
bind
//Called a trigger
call
_sortEventsDepthIndex
//音乐相关函数
//Change the audio volume for one or all types
setVolumeAudio
playBGM
playBGS
_playBG
playSE
playME
_playSoundEffect
//屏幕相关函数
screenFlash
screenShake
_tickShake
changeScreenColorTone
setTypeDirection
addHtmlElement
_tickHtmlElements
setCanvasSize
//Set the screen on an object (player, event, mouse ...)
setScreenIn
getMapWidth
getMapHeight
//Move map to positions
scroll
//Place the screen at fixed positions.
setScreen
setCamera
_multipleScreen
//Sets the speed of scrolling. The higher the number, the higher the speed is slow
setScrolling
//鼠标相关函数
unbindMouseEvent
//Attach a mouse behavior to a function
bindMouseEvent
_setMouseEvent
_getMouseData
//图片相关函数
addPicture
movePicture
rotatePicture
erasePicture
//角色属性相关函数
addItem
removeItem
setItem
getItem
changeGold
//系统相关函数
save
load
slotExist
deleteSlot
setLang
toLang
setFPS
Rpg.debug//调试模式
Rpg.mobileUserAgent//处理屏幕适配
initialize
Rpg(canvas_tag)
//插件相关函数
initPlugins
addPlugin
plugin
//Store a value in a variable
setVariable
getVariable
_setDataValue
//Enable or disable switch
setSwitches
switchesIsOn
setTactical
tacticalAreaClear
isTactical
//瓦格相关函数
tilePriority
tilePassage
_tilePropretiesDefault
_tileValueDefault
//Whether the X and Y position on the map is passable or not.
isPassable
_positionValueToReal
_positionRealToValue
//其他函数
Rpg.isArray
Rpg.keyExist
Rpg.valueExist
Rpg.unsetArrayElement
Rpg.endArray
tick
clone
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值