AvatarQing / FlappyBird

Flappy Bird game developed by Cocos Creator which can run on Web, Android and iOS
87 stars 36 forks source link

Regarding version mismatch. #2

Open techguruCD opened 6 years ago

techguruCD commented 6 years ago

Hi. I've tried to use your source code on my PC but it doesn't work with many errors. I think the version is different when you've committed between now and while the Cocos is updating, some functions are removed or some functions're added.

And I can't fix this problem. image

` _spawnPipe(){

    let pipeGroup = null;

    if (cc.pool.hasObject(PipeGroup)) {              // Cocos can't find 'hasObject'

        pipeGroup = cc.pool.getFromPool(PipeGroup);

    } else {

        pipeGroup = cc.instantiate(this.pipePrefab).getComponent(PipeGroup);

    }

    this.node.addChild(pipeGroup.node);

    pipeGroup.node.active = true;

    pipeGroup.init(this);

    this.pipeList.push(pipeGroup);

},

`

Please help me with this. Great regards. Colin