WordGame Wepy Save

基于wepy实现的微信小程序,一款文字游戏

Project README

WordGame

基于wepy实现的微信小程序,一款文字游戏

截图

1. 安装 wepy

npm install wepy-cli -g

2. 安装依赖库

cd wordgame
npm install

3. 编译代码,转换至小程序代码

wepy build

4.预览

在微信开发工具中导入项目,项目路径为dist目录

游戏剧本

Scripts = {
  // 游戏角色列表
  roles: [{
    id: 0,          // 角色id
    name: 'X',      // 角色名称
    avatar: ''      // 角色头像
  }],
  playerRoleID: 0,  // 玩家扮演的角色id
  chapters: [{
    name: '第一章',  // 章节名称
    lines: [{       // 台词
      roleID: 0,
      content: 'https://xxx.png',
      contentType: 1,   // 台词类型,0表示文本,1表示图片
      goto: '剧本2'      // 下一条台词的id
    }, {
      id: '剧本2'
      roleID: 1,
      selections: [{    // 玩家的选项
        content: '跳转到第二条剧本',
        goto: '剧本3'
      }, {
        content: '跳转到第三条剧本',
        goto: '剧本4'
      }]
    }]
  }]
}
Open Source Agenda is not affiliated with "WordGame Wepy" Project. README Source: zh8637688/WordGame-wepy
Stars
34
Open Issues
0
Last Commit
6 years ago
Tags

Open Source Agenda Badge

Open Source Agenda Rating