【cocos2d-js官方文檔】十、log,cocos2d-js文檔log

來源:互聯網
上載者:User

【cocos2d-js官方文檔】十、log,cocos2d-js文檔log

api改動情況,左邊為新增,右邊為原來的。

cc.log  不變cc.warn 新增cc.error 新增cc.assert <-- cc.Assert

此次改造有以下幾點原因:

  • 添加原來沒有的api:cc.warn、cc.error。

  • 修改cc.Assert名稱,使其符合開發規範。

新的api的使用範例:

cc.log("this is a log");cc.log("this is a log for %s", "Cocos2d-html5");cc.warn("this is a waring");cc.warn("this is a waring for %s", "Cocos2d-html5");cc.error("this is an error");cc.error("this is an error for %s", "Cocos2d-html5");cc.assert(false, "this is an assert");cc.assert(false, "this is an assert for %s", "Cocos2d-html5");

然後今後會定義出msgCode.js

cc.msgCode = {    log1 : "this is a log",    log2 : "this is a log for %s",    warn1 : "this is a waring",    warn2 : "this is a waring for %s",    error1 : "this is an error",    error2 : "this is an error for %s",    assert1 : "this is an assert",    assert2 : "this is an assert for %s",    throw1 : "this is an throw",    throw2 : "this is an throw for %s", "Cocos2d-html5"}

這樣一來可以讓訊息字串等到最大程度的複用並且利於管理。


轉載:http://www.douapp.com/post/2454


高一數學必修一對數比較大小:1若1<x<10,那(log以十為底的x的對數)的平方; log以十為底x的平方; lg

暈··這表示方式真蛋疼,log以十為底不就是lg麼,這三個你寫成(lgx)²和lgx²和lg(lgx)不就好了
∵1<x<10
∴0<lgx<1
∴lglgx<0<(lgx)²<lgx²<1
 
log以十為底十倍根號十的對數

log10(10√10)
=log10(10^(3/2))
=3/2;

請採納

如果你認可我的回答,敬請及時採納,
~如果你認可我的回答,請及時點擊【採納為滿意回答】按鈕
~~手機提問的朋友在用戶端右上方評價點【滿意】即可。
~你的採納是我前進的動力
~~O(∩_∩)O,記得好評和採納,互相協助
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.