Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

Uncaught TypeError: Cannot read property 'LineCap' of undefined

$
0
0

@gaofei_dev 写道:

Uncaught TypeError: Cannot read property 'LineCap' of undefined

// 代码段

start: function () {
if (cc.director.setClearColor) {
cc.director.setClearColor( cc.hexToColor('#01aaff') );
}

    this.time = 0;

    this.ctx = this.getComponent("cc.Graphics");
    this.ctx.lineCap = cc.Graphics.LineCap.BUTT;
    this.ctx.lineJoin = cc.Graphics.LineJoin.ROUND;

    let waves = this.waves;
    for (let i = 0, l = waves.length; i < l; i++) {
        waves[i].waveFn = Waves[Waves.Enum[waves[i].waveType]].bind(Waves);
        waves[i].easeFn = Ease[Ease.Enum[waves[i].easeType]].bind(Ease);
    }
},

帖子: 5

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>