Skip to content
On this page

猹引擎

GUI总览

配置文件

txt
plugins/ChaEngine/ui/*.yml
plugins/ChaEngine/slot.yml
plugins/ChaEngine/ui/*.html

UI 页面配置字段

ui/*.yml 页面节点支持字段:

  • html
  • center
  • hud
  • override
  • x
  • y
  • yaw
  • width
  • height

样例:

yml
测试页面:
  html: "测试页面.html"
  center: true
  hud: false
  x: 0
  y: 0
  yaw: "auto"
  width: 960
  height: 540

血量HUD:
  html: "血量HUD.html"
  center: false
  hud: true
  override: "hp"
  x: 12
  y: 12
  width: 206
  height: 38

槽位配置字段

slot.yml 槽位节点支持字段:

  • id
  • max
  • condition

样例:

yml
项链槽位:
  id: necklace
  max: 1
  condition:
    - "papi#%player_level% >= 10"
    - "perm#group.vip1"
    - "lore#装备类型: 项链#放入物品不是项链"

戒指槽位:
  max: 1
  condition:
    - "papi#%player_level% >= 10"
    - "lore#装备类型: 戒指"

页面样例

  • ui/测试页面.html
  • ui/血量HUD.html

测试页面.html 已包含:

  • ChaEngine.openUi
  • ChaEngine.sendToServer
  • ChaEngine.onServerData
  • ChaEngine.getPlayerData
  • ChaEngine.bindSlots / clickSlot / syncSlots / clearSlotBindings

血量HUD.html 已包含:

  • chaengine:player-data 监听
  • ChaEngine.getPlayerData 轮询
  • HUD 血条宽度实时更新

配置相关文档入口