• 手机版

    扫码体验手机版

  • 微信公众号

    扫码关注公众号

国内首家协议开发

软芯音视解码保护平台

在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

我也设置了透明度,上浮了, 怎么我的那么丑


海葵
draw:function(deltaTime){                                // console.info("draw deltaTime is : "+ deltaTime);                                this.cantx.save();                                                                this.cantx.globalAlpha=0.3;                                        // 线宽                                this.cantx.lineWidth=10;                                // 端点样式                                this.cantx.lineCap="round";                                // 颜色                                this.cantx.strokeStyle="#3b154e";                                for (var i = 0; i < this.num; i++) {                                        // console.info(this.anes.x + deltaTime);                                        // console.info(this.can.height - this.anes.len);                                        // beginPath, moveTo,lineTo,stroke,strokeStyle,lineWidth,lineCap,                                        // 开始绘制路径                                        this.cantx.beginPath();                                        // 指针跳到某点                                        this.cantx.moveTo(this.anes.x,this.can.height);                                        // 画到某点                                        this.cantx.lineTo(this.anes.x , this.can.height - this.anes.len);                                        // console.info("x "+this.anes.x+ ",y "+this.can.height+ ",tx "+this.anes.x+" ,ty"+this.can.height - this.anes.len);                                        // 开始绘制                                        this.cantx.stroke();                                }                                this.cantx.restore();                        }



实物
        fruitDraw.prototype = {                draw : function(deltaTime){                        // 成长                        for (var i = this.fruits0.length - 1; i >= 0; i--) {                                 var fruit = this.fruits0;                                 // console.info("growing");                                 // this.cantx.drawImage(fruit.img,fruit.x-10,fruit.y-10);                                 this.cantx.drawImage(fruit.img,fruit.x - fruit.size * 0.5, fruit.y - fruit.size * 0.5, fruit.size, fruit.size);                                 this.growing(i,deltaTime);                        }                        // 上浮                        for (var i = this.fruits1.length - 1; i >= 0; i--) {                                 var fruit = this.fruits1;                                 // console.info("drifted");                                 // this.cantx.drawImage(fruit.img,fruit.x-10,fruit.y-10);                                 this.cantx.drawImage(fruit.img,fruit.x - fruit.size * 0.5, fruit.y - fruit.size * 0.5, fruit.size, fruit.size);                                 this.drifted(i,deltaTime);                        }                }        }

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

发新帖

发布任务需求已有1031167位用户正在使用天盟网服务

发布分类: *
任务预算: *
需求内容: *
手机号码: *
任务商家报价为
  • 预算价 :
  • 成交价 :
  • 完工期 :
  • 质保期 :

* 最终任务项目以服务商报价、双方协商为准!