• Cocos Creator的小点


    声明的时候,变量如此;但用的时候就变成了border,找了很久的问题,一直没找到啊,后来就发现命名的时候和内置的一定不要太相似否则后悔的只能是自己;

    cc.Class({
        extends: cc.Component,
    
        properties: {
        
    
            moveTime:14,
            BgCount:18,
            borderWith:300
        }, 
        PlayerMoveToRight:function () {
           // var goright=cc.moveTo(0.2,cc.p(this.node.width/2-this.border,this.player.y));
            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxx
        },
        
    });

    2,声音的API,运行倒是没问题,就是一直无法播放。。。。

    cc.audioEngine.play();

    3,还有一个就是无意间发现的,鼠标放在代码尾侧,上下一部分代码会有放大镜的效果;

  • 相关阅读:
    动画,缩放
    本地公司
    调研 公司信息
    外贸 内贸 经商
    情感 爱情 恋爱
    H5源码
    世界 生活
    标识
    Jackson
    java数据结构
  • 原文地址:https://www.cnblogs.com/allyh/p/9521114.html
Copyright © 2020-2023  润新知