Skip to content

Game_Message

Kind: global class

  • Game_Message
    • new Game_Message()
    • instance
      • .choices() ⇒ Array
      • .faceName() ⇒ string
      • .faceIndex() ⇒ number
      • .background() ⇒ number
      • .positionType() ⇒ number
      • .choiceDefaultType() ⇒ number
      • .choiceCancelType() ⇒ number
      • .choiceBackground() ⇒ number
      • .choicePositionType() ⇒ number
      • .numInputVariableId() ⇒ number
      • .numInputMaxDigits() ⇒ number
      • .itemChoiceVariableId() ⇒ number
      • .itemChoiceItypeId() ⇒ number
      • .scrollMode() ⇒ boolean
      • .scrollSpeed() ⇒ number
      • .scrollNoFast() ⇒ boolean
      • .add(text)
      • .setFaceImage(faceName, faceIndex)
      • .setBackground(background)
      • .setPositionType(positionType)
      • .setChoices(choices, defaultType, cancelType)
      • .setChoiceBackground(background)
      • .setChoicePositionType(positionType)
      • .setNumberInput(variableId, maxDigits)
      • .setItemChoice(variableId, itemType)
      • .setScroll(speed, noFast)
      • .setChoiceCallback(callback)
      • .onChoice(n)
      • .hasText() ⇒ boolean
      • .isChoice() ⇒ boolean
      • .isNumberInput() ⇒ boolean
      • .isItemChoice() ⇒ boolean
      • .isBusy() ⇒ boolean
      • .newPage()
      • .allText() ⇒ string
    • static
      • .initialize()
      • .clear()

new Game_Message()

游戏信息类,管理信息窗口的各种状态,包括文本内容、脸图、背景、位置、选项、数值输入等功能
Game message class that manages the state of the message window with text content, face graphics, background, position, choices, and number input


game_Message.choices() ⇒ Array

选择
Get choices

Kind: instance method of Game_Message
Returns: Array - 选择选项数组


game_Message.faceName() ⇒ string

脸图名
Get face name

Kind: instance method of Game_Message
Returns: string - 脸图文件名


game_Message.faceIndex() ⇒ number

脸图索引
Get face index

Kind: instance method of Game_Message
Returns: number - 脸图在文件中的索引


game_Message.background() ⇒ number

背景
Get background type

Kind: instance method of Game_Message
Returns: number - 背景类型(0:窗口 1:暗色 2:透明)


game_Message.positionType() ⇒ number

位置类型
Get position type

Kind: instance method of Game_Message
Returns: number - 位置类型(0:上 1:中 2:下)


game_Message.choiceDefaultType() ⇒ number

选项默认类型
Get choice default type

Kind: instance method of Game_Message
Returns: number - 选项默认类型


game_Message.choiceCancelType() ⇒ number

选项取消类型
Get choice cancel type

Kind: instance method of Game_Message
Returns: number - 选项取消类型


game_Message.choiceBackground() ⇒ number

选项背景
Get choice background

Kind: instance method of Game_Message
Returns: number - 选项背景类型


game_Message.choicePositionType() ⇒ number

选项位置类型
Get choice position type

Kind: instance method of Game_Message
Returns: number - 选项位置类型


game_Message.numInputVariableId() ⇒ number

数值输入变量 ID
Get number input variable ID

Kind: instance method of Game_Message
Returns: number - 数值输入结果存储的变量 ID


game_Message.numInputMaxDigits() ⇒ number

数值输入最大位数
Get number input max digits

Kind: instance method of Game_Message
Returns: number - 数值输入的最大位数


game_Message.itemChoiceVariableId() ⇒ number

物品选择变量 ID
Get item choice variable ID

Kind: instance method of Game_Message
Returns: number - 物品选择结果存储的变量 ID


game_Message.itemChoiceItypeId() ⇒ number

物品选择类型 ID
Get item choice type ID

Kind: instance method of Game_Message
Returns: number - 物品选择的类型 ID


game_Message.scrollMode() ⇒ boolean

滚动模式
Get scroll mode

Kind: instance method of Game_Message
Returns: boolean - 是否为滚动模式


game_Message.scrollSpeed() ⇒ number

滚动速度
Get scroll speed

Kind: instance method of Game_Message
Returns: number - 滚动速度


game_Message.scrollNoFast() ⇒ boolean

滚动禁止快进
Get scroll no fast

Kind: instance method of Game_Message
Returns: boolean - 是否禁止快进滚动


game_Message.add(text)

向信息窗口添加一行文本

Kind: instance method of Game_Message

ParamTypeDescription
textstring要添加的文本行

game_Message.setFaceImage(faceName, faceIndex)

设置信息窗口显示的脸图

Kind: instance method of Game_Message

ParamTypeDescription
faceNamestring脸图文件名
faceIndexnumber脸图索引

game_Message.setBackground(background)

设置信息窗口的背景类型

Kind: instance method of Game_Message

ParamTypeDescription
backgroundnumber背景类型

game_Message.setPositionType(positionType)

设置信息窗口的显示位置

Kind: instance method of Game_Message

ParamTypeDescription
positionTypenumber位置类型

game_Message.setChoices(choices, defaultType, cancelType)

设置选择选项的内容和行为

Kind: instance method of Game_Message

ParamTypeDescription
choicesArray选项数组
defaultTypenumber默认选择类型
cancelTypenumber取消选择类型

game_Message.setChoiceBackground(background)

设置选项窗口的背景类型

Kind: instance method of Game_Message

ParamTypeDescription
backgroundnumber背景类型

game_Message.setChoicePositionType(positionType)

设置选项窗口的显示位置

Kind: instance method of Game_Message

ParamTypeDescription
positionTypenumber位置类型

game_Message.setNumberInput(variableId, maxDigits)

设置数值输入的参数

Kind: instance method of Game_Message

ParamTypeDescription
variableIdnumber变量 ID
maxDigitsnumber最大位数

game_Message.setItemChoice(variableId, itemType)

设置物品选择的参数

Kind: instance method of Game_Message

ParamTypeDescription
variableIdnumber变量 ID
itemTypenumber物品类型

game_Message.setScroll(speed, noFast)

设置文本滚动的参数

Kind: instance method of Game_Message

ParamTypeDescription
speednumber滚动速度
noFastboolean是否禁止快进

game_Message.setChoiceCallback(callback)

设置选择选项时的回调函数

Kind: instance method of Game_Message

ParamTypeDescription
callbackfunction回调函数

game_Message.onChoice(n)

当玩家选择选项时调用

Kind: instance method of Game_Message

ParamTypeDescription
nnumber选择的选项索引

game_Message.hasText() ⇒ boolean

是否有文本
Check if has text

Kind: instance method of Game_Message
Returns: boolean - 是否有文本内容


game_Message.isChoice() ⇒ boolean

是否是选项
Check if is choice

Kind: instance method of Game_Message
Returns: boolean - 是否有选择选项


game_Message.isNumberInput() ⇒ boolean

是否数值输入
Check if is number input

Kind: instance method of Game_Message
Returns: boolean - 是否为数值输入模式


game_Message.isItemChoice() ⇒ boolean

是否是物品选择
Check if is item choice

Kind: instance method of Game_Message
Returns: boolean - 是否为物品选择模式


game_Message.isBusy() ⇒ boolean

检查是否有任何待处理的信息窗口内容

Kind: instance method of Game_Message
Returns: boolean - 信息窗口是否处于繁忙状态


game_Message.newPage()

在当前文本末尾添加换页符

Kind: instance method of Game_Message


game_Message.allText() ⇒ string

将所有文本行合并为一个字符串,用换行符分隔

Kind: instance method of Game_Message
Returns: string - 所有文本行合并的字符串


Game_Message.initialize()

初始化
Initialize the Game_Message object

Kind: static method of Game_Message


Game_Message.clear()

清空
Clear all message data

Kind: static method of Game_Message


贡献者

暂无相关贡献者

页面历史

暂无最近变更历史
最近更新