GithubHelp home page GithubHelp logo

wordgame-wepy's Introduction

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'
      }]
    }]
  }]
}

wordgame-wepy's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.