HTML5Canvas游戏开发实战

59 篇文章 0 订阅
50 篇文章 1 订阅

HTML5Canvas游戏开发实战 目录


前言

  • 本文为进阶,旨在为个人记录和学习,如有需要,请阅读原书
    主要介绍内容:
  1. 准备
  2. 基础知识
  3. 开发实战
  4. 提高效率

推荐阅读

  • 《HTML5 Canvas游戏开发实战》

准备工作

H5新特性

  • 地理位置引入:Geolocation API
  • 本地数据库:WebSQL存储数据,web storage API实现离线缓存

1. video标签播放动画

    <video width="640" height="360" preload="auto" poster="hoge.png" controls autoplay>
        <!-- webm type -->
        <source src="hoge.webm" type='video/webm; codecs="vp8, vorbis"'>
        <!-- ogv -->
        <source src="hoge.ogv" type='video/ogg; codecs="theora, vorbis"'>
        <!-- mp4 -->
        <source src="hoge.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
        <!-- 无法使用video -->
        <p>无法播放动画<a href="#">推荐环境请看这里</a></p>
    </video>

2. audio

    <audio controls loop>
        <!-- only ogg -->
        <source src="hoge.ogg">
        <!-- only wav -->
        <source src="hoge.wav">
        <!-- only mp3 -->
        <source src="hoge.mp3">
        <!-- can't use audio tag -->
        <p>Can't use audio tag.<a href="#">Click there.</a></p>
    </audio>

3. Canvas

    <canvas id="canvas" width="640" height="360"></canvas>

    <script>
        let canvas = document.getElementById("canvas");
        if(canvas.getContext){
            let context = canvas.getContext('2d');
            // color
            context.fillStyle = 'rgb(255, 0, 0)';
            // potray 64x36 matrix from (20, 30)
            context.fillRect(20,30,64,36);
        }
    </script>

效果:
在这里插入图片描述

4. 获取当前位置

 <script>
        window.addEventListener('load', () => {
            // 判断可否使用geolocation
            if(navigator.geolocation){
                // regular get location
                navigator.geolocation.watchPosition(position => {
                    console.log(position);
                    // 纬度
                    let lat = position.coords.latitude;
                    // 经度
                    let lng = position.coords.longitude;
                    // performance
                    document.write(`lattitude: ${lat}, longitude: ${lng}`);
                }, err => {
                    console.log("error, can't use");
                });
            }
        }, false);

    </script>

效果:
在这里插入图片描述

在这里插入图片描述

5. 大量数据保存在客户端

LocalStorage保存大量的数据

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 用localstorage来保存数据
        localStorage.key = 'wantted data';
        // 取出来localstorage的值
        let hoge = localStorage.key;
        // 显示
        document.write(hoge);
        localStorage.setItem("fwx", "xwf");
    </script>
</body>
</html>

6. form强化

form常用功能

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- verify type -->
    <input name="email" type="email">
    <!-- require -->
    <input name="text" type="text" required>
    <!-- focus -->
    <input name="text" type="text" placeholder="name">
</body>
</html>

canvas

绘图

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas" width="200" height="100"></canvas>
    <script>
        onload = () => {
            // find canvas based id
            let canvas = document.getElementById('canvas');
            // verify
            if(!canvas || !canvas.getContext)   return false;
            // create context object
            let ctx = canvas.getContext('2d');
            // potray
            ctx.fillStyle = '#FF0000';
            ctx.fillRect(0, 0, 150, 75);
        };
    </script>
</body>
</html>

解释

  • 获取<canvas>标签,一般是通过id/name获得
  • 要使用canvas元素,必须判断浏览器是否支持使用
  • getContext方法中传递一个2d参数,从而可以得到二维对象,并实现二维图像描画
  • fillStyle画笔颜色

canvas实现三维的推荐

如果要实现三维效果,需要借助第三方类库:

  • three.js
  • Papervision3D

JS实现继承

  • 创建两个构造函数
  • 使用apply方法,将父对象的构造函数绑定在子对象上
  • 方法的继承:循环使用父对象的prototype进行复制,即可达到继承的目的
function PeopleClass() {
    this.type = "human";
}

PeopleClass.prototype = {
    getType: function() {
        alert("this is a man.");
    }
};

function StudentClass(name, sex) {
    PeopleClass.apply(this, arguments);
    let prop;
    for (prop in PeopleClass.prototype){
        let proto = this.constructor.prototype;
        if(!proto[prop])    proto[prop] = PeopleClass.prototype[prop];

        proto[prop]["super"] = PeopleClass.prototype;
    }

    this.name = name;
    this.sex = sex;
}

let stu = new StudentClass("lufy", "man");
alert(stu.type);
stu.getType();

第二部分:基础知识

canvas基本功能

1. 画直线

  • 获取canvas对象
  • 返回环境后,选择canvasRenderingContext2D对象,制作二维图像
  • 设置线条宽度:xx.lineWidth
  • 设置画笔颜色:xx.strokeStyle = "red"
  • 创建一个新的路径:xx.beginPath()
  • 画笔光标位置移动到指定坐标:xx.moveTo(x,y)
  • 从当前坐标开始,移动画笔到指定坐标,并绘制线:xx.lineTo(x,y)
  • 开始绘制:xx.stroke()
  • 定义线帽的样式:xx.lineCap = "butt";
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas" width="200" height="200"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.lineWidth = 10;
        ctx.strokeStyle = "red";
        ctx.beginPath();

        ctx.moveTo(10, 10);
        ctx.lineTo(150, 50);
        ctx.stroke();

    </script>
</body>
</html>

效果图:
在这里插入图片描述

线帽:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById("canvas");
        let ctx = c.getContext('2d');
        ctx.lineWidth = 10;
        ctx.strokeStyle = "blue";

        ctx.lineCap = "butt";
        ctx.beginPath();
        ctx.moveTo(10,10);
        ctx.lineTo(150,10);
        ctx.stroke();

        ctx.lineCap = "round";
        ctx.beginPath();
        ctx.moveTo(10,40);
        ctx.lineTo(150,40);
        ctx.stroke();

        ctx.lineCap = "square";
        ctx.beginPath();
        ctx.moveTo(10,70);
        ctx.lineTo(150,70);
        ctx.stroke();                
    </script>
</body>
</html>

效果图:
在这里插入图片描述

2. 画矩形

  • xx.strokeRect()可以替换为xx.rect();xx.stroke();
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script type="text/javascript">
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.lineWidth = 5;
        ctx.strokeStyle = "blue";
        ctx.beginPath();
        ctx.strokeRect(10, 10, 70, 40);        
    </script>
</body>
</html>

结果:
在这里插入图片描述

实心矩阵
  • 替换为fillRect()
  • 也可以换做ctx.rect();ctx.fill();
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script type="text/javascript">
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.lineWidth = 5;
        ctx.fillStyle = "red";
        ctx.beginPath();
        ctx.fillRect(10, 10, 70, 40);        

    </script>
</body>
</html>

结果:
在这里插入图片描述

3. 圆形

  • arc(x,y,r,rid,endrid,yy)
  • xx.fill()填充实心圆
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.lineWidth = 5;
        ctx.strokeStyle = 'red';
        ctx.beginPath();
        ctx.arc(100, 100, 70, 0, 130*Math.PI/100, true);
        ctx.stroke();
    </script>
</body>
</html>

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.lineWidth = 5;
        ctx.fillStyle = 'red';
        ctx.beginPath();
        ctx.arc(100, 100, 70, 0, 130*Math.PI/100, true);
        ctx.fill();
    </script>
</body>
</html>

在这里插入图片描述

4. 画圆角矩形

  • 圆角:arcTo(x,y,x,y,r)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.beginPath();
        ctx.strokeStyle = "red";
        ctx.moveTo(20, 20);
        ctx.lineTo(70, 20);
        ctx.arcTo(120, 30, 120, 70, 50);
        ctx.lineTo(120, 120);
        ctx.stroke();
    </script>
</body>
</html>

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.beginPath();
        ctx.strokeStyle = "red";
        ctx.moveTo(40, 20);
        ctx.lineTo(120, 20);
        ctx.arcTo(120, 20, 120, 40, 20);
        ctx.lineTo(120, 70);

        ctx.arcTo(120,90,100,90,20);
        ctx.lineTo(40,90);

        ctx.arcTo(20,90,20,70,20);
        ctx.lineTo(20, 40);

        ctx.arcTo(20,20,40,20,20);
        ctx.stroke();
    </script>
</body>
</html>

在这里插入图片描述

5. 擦除Canvas画板

  • 擦除矩形区域:clerRect(x,y,long,width)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.fillStyle = 'red';
        ctx.beginPath();
        ctx.fillRect(10,10,200,100);
        ctx.clearRect(30,30,50,50);
    </script>
</body>
</html>

在这里插入图片描述

复杂图形

1. 曲线

  • 又名贝塞尔曲线,贝兹曲线或贝济埃曲线,应用于二维图形的数学曲线
1. 二次贝塞尔曲线
  • 存在一个控制点
  • quadraticCurveTo(cpx, cpy, x, y)
  • cpx,cpy 控制点的坐标
  • x,y 终点坐标
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.strokeStyle = 'red';
        ctx.beginPath();

        ctx.moveTo(100, 100);
        ctx.quadraticCurveTo(20, 50, 200, 20);
        ctx.stroke();
    </script>
</body>
</html>

在这里插入图片描述

2. 三次贝塞尔曲线
  • 三次贝塞尔又两个控制点
  • bezierCurveTo(cx1,cy1,cx2,cy2,endx,endy)
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.strokeStyle = 'red';
        ctx.beginPath();

        ctx.moveTo(68, 130);
        ctx.bezierCurveTo(20,10,268,10,268,170);
        ctx.stroke();
    </script>
</body>
</html>

在这里插入图片描述

2. clip在指定区域绘图

  • clip使用当前路径作为连续绘制操作的剪切区域
  • 无论画板上绘制了多大的图形,最后的图形只能由clip这扇窗户决定
  • 先绘制一个圆,clip函数把这个圆作为绘制操作的区域,之后的图形只能显示在这个区域离
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas id="canvas"></canvas>
    <script>
        let c = document.getElementById('canvas');
        let ctx = c.getContext('2d');

        ctx.arc(100,100,40,0,360*Math.PI/180,true);
        ctx.clip();

        ctx.beginPath();

        ctx.fillStyle = "lightblue";
        ctx.fillRect(0,0,300,150);

    </script>
</body>
</html>

对比
前:
在这里插入图片描述

后:
在这里插入图片描述

3. 自定义图形


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
HTML5 CANVAS游戏开发实战(PDF和源代码) 第一部分 准备工作篇 第1章 准备工作 / 2 1.1 html5介绍 / 2 1.1.1 什么是html5 / 2 1.1.2 html5的新特性 / 2 1.2 canvas简介 / 5 1.2.1 canvas标签的历史 / 5 1.2.2 canvas的定义和用法 / 6 1.2.3 如何使用canvas来绘图 / 6 1.2.4 canvas的限制 / 7 1.3 开发与运行环境的准备 / 7 1.3.1 浏览器的支持 / 7 1.3.2 准备一个本地的服务器 / 8 1.4 开发工具的选择 / 8 1.5 测试与上传代码 / 12 1.6 javascript中的面向对象 / 13 1.6.1 类 / 13 1.6.2 静态类 / 16 .1.6.3 继承 / 16 1.7 小结 / 17 第二部分 基础知识篇 第2章 canvas基本功能 / 20 2.1 绘制基本图形 / 20 2.1.1 画线 / 20 2.1.2 画矩形 / 22 2.1.3 画圆 / 24 2.1.4 画圆角矩形 / 26 2.1.5 擦除canvas画板 / 27 2.2 绘制复杂图形 / 28 2.2.1 画曲线 / 28 2.2.2 利用clip在指定区域绘 图 / 30 2.2.3 绘制自定义图形 / 31 2.3 绘制文本 / 32 2.3.1 绘制文字 / 32 2.3.2 文字设置 / 33 2.3.3 文字的对齐方式 / 38 2.4 图片操作 / 41 2.4.1 利用drawimage绘制图片 / 41 2.4.2 利用getimagedata和putimagedata绘制图片 / 45 2.4.3 利用createimagedata新建像素 / 47 2.5 小结 / 49 第3章 canvas高级功能 / 50 3.1 变形 / 50 3.1.1 放大与缩小 / 50 3.1.2 平移 / 53 3.1.3 旋转 / 54 3.1.4 利用transform矩阵实现多样化的变形 / 56 3.2 图形的渲染 / 65 3.2.1 绘制颜色渐变效果的图形 / 65 3.2.2 颜色合成之globalcompositeoperation属性 / 67 3.2.3 颜色反转 / 69 3.2.4 灰度控制 / 70 3.2.5 阴影效果 / 71 3.3 自定义画板 / 72 3.3.1 画板的建立 / 72 3.3.2 canvas画布的导出功能 / 79 3.4 小结 / 81 第4章 lufylegend开源库件 / 82 4.1 lufylegend库件简介 / 82 4.1.1 工作原理 / 82 4.1.2 库件使用流程 / 83 4.2 图片的加载与显示 / 84 4.2.1 图片显示举例 / 84 4.2.2 lbitmapdata对象 / 86 4.2.3 lbitmap对象 / 87 4.3 层的概念 / 88 4.4 使用lgraphics对象绘图 / 90 4.4.1 绘制矩形 / 90 4.4.2 绘制圆 / 91 4.4.3 绘制任意多边形 / 92 4.4.4 使用canvas的原始绘图函数进行绘图 / 93 4.4.5 使用lsprite对象进行绘图 / 94 4.4.6 使用lgraphics对象绘制图片 / 95 4.5 文本 / 101 4.5.1 文本属性 / 101 4.5.2 输入框 / 102 4.6 事件 / 103 4.6.1 鼠标事件 / 103 4.6.2 循环事件 / 104 4.6.3 键盘事件 / 105 4.7 按钮 / 106 4.8 动画 / 108 4.9 小结 / 113 第三部分 开发实战篇 第5章 从简单做起—“石头剪子布”游戏 / 116 5.1 游戏分析 / 116 5.2 必要的javascript知识 / 117 5.2.1 随机数 / 117 5.2.2 条件分支 / 117 5.3 分层实现 / 117 5.4 各个层的基本功能 / 119 5.4.1 基本画面显示 / 119 5.4.2 结果层的显示 / 126 5.4.3 控制层的显示 / 127 5.5 出拳 / 129 5.6 结果判定 / 131 5.7 小结 / 137 第6章 开发“俄罗斯方块”游戏 / 138 6.1 游戏分析 / 138 6.2 必要的javascript知识 / 138 6.3 游戏标题画面显示 / 139 6.4 向游戏里添加方块 / 141 6.5 控制方块的移动 / 152 6.5.1 键盘事件 / 152 6.5.2 触屏事件 / 155 6.6 方块的消除和得分的显示 / 157 6.7 小结 / 160 第7章 开发“是男人就下一百层”游戏 / 161 7.1 游戏分析 / 161 7.2 游戏标题画面显示 / 161 7.3 读取图片与背景显示 / 162 7.4 添加一个静止的地板 / 167 7.5 添加游戏主角 / 170 7.5.1 让游戏主角出现在画面上 / 170 7.5.2 通过键盘事件来控制游戏主角的移动 / 177 7.5.3 通过触屏事件来控制游戏主角的移动 / 178 7.6 添加多种多样的地板 / 179 7.6.1 会消失的地板 / 179 7.6.2 带刺的地板 / 181 7.6.3 带有弹性的地板 / 182 7.6.4 向左和向右移动的地板 / 184 7.7 游戏数据的显示 / 187 7.8 游戏结束与重开 / 190 7.9 小结 / 192 第8章 开发射击类游戏 / 193 8.1 游戏分析 / 193 8.2 添加一架可控飞机 / 194 8.2.1 添加一个飞机类 / 194 8.2.2 可控飞机类 / 197 8.3 为飞机添加多样化的子弹 / 203 8.3.1 建立一个子弹类 / 203 8.3.2 单发子弹 / 205 8.3.3 多发子弹 / 207 8.3.4 环形子弹 / 208 8.3.5 反向子弹 / 209 8.4 添加敌机 / 209 8.4.1 建立一个敌机类 / 210 8.4.2 建立一个敌机boss类 / 214 8.5 碰撞检测 / 217 8.5.1 飞机与子弹的碰撞 / 217 8.5.2 我机与敌机的碰撞 / 220 8.6 子弹的变更 / 221 8.6.1 建立一个弹药类 / 222 8.6.2 弹药与我机的碰撞 / 223 8.7 飞机生命值的显示 / 225 8.8 游戏胜利与失败判定 / 226 8.9 小结 / 228 第9章 开发物理游戏 / 229 9.1 box2d简介 / 229 9.2 box2dweb在lufylegend库件中的使用 / 229 9.3 创建各种各样的物体 / 234 9.3.1 矩形物体 / 234 9.3.2 圆形物体 / 237 9.3.3 多边形物体 / 239 9.4 响应鼠标拖拽物体 / 242 9.5 关节(joint) / 243 9.5.1 距离关节(b2distancejointdef) / 243 9.5.2 旋转关节(b2revolutejointdef) / 245 9.5.3 滑轮关节(b2pulleyjointdef) / 247 9.5.4 移动关节(b2prismaticjoint) / 248 9.5.5 齿轮关节(b2gearjoint) / 250 9.5.6 悬挂关节(b2linejoint) / 252 9.5.7 焊接关节(b2weldjoint) / 253 9.5.8 鼠标关节(mouse joint) / 254 9.6 力 / 254 9.7 碰撞检测 / 256 9.8 镜头移动 / 260 9.9 做一个简单的物理游戏 / 263 9.10 小结 / 267 第10章 开发网络游戏 / 268 10.1 http通信 / 268 10.1.1 如何实现http通信 / 268 10.1.2 http通信的弊端 / 275 10.2 socket通信 / 275 10.2.1 区分socket通信和http通信 / 276 10.2.2 服务器端 / 276 10.2.3 客户端 / 281 10.3 利用websocket实现简单的聊天室 / 283 10.4 做一款多人在线的坦克大战 / 293 10.4.1 服务器 / 293 10.4.2 客户端 / 293 10.5 小结 / 307 第四部分 技能提高篇 第11章 提高效率的分析 / 310 11.1 绘图时使用小数的影响 / 310 11.2 drawimage和putimagedata的效率比较 / 311 11.3 区域更新和图片大小对绘图效率的影响 / 311 11.4 图片格式对绘图效率的影响 / 313 11.5 优化代码以提高整体效率 / 314 11.5.1 使用位运算 / 314 11.5.2 少用math静态类 / 316 11.5.3 优化算法 / 319 11.6 小结 / 322
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值