惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

博客园 - SeanLin

Cocos2d-html5资源预加载列表自动扫描脚本 JSDoc参考注释模板 [转]Git常用操作命令 Cocos2d-html5 HelloWorld模板和引擎使用简介 Javascript API Document生成工具JSDoc HTML5游戏开发涉及到的安全问题 Javascript开发的HTML5游戏的知识产权保护 CCTextureCache的多线程加载原理和使用 引擎demo任务 引擎开发数据记录 游戏引擎消息循环机制 渲染部分 几个需要思考的问题 【转】使用Jasob混淆javascript代码 【转】html5游戏开发引擎大全 【转】V8 Javascript 引擎设计理念 android 字体位置信息 【转】蓝牙协议中HCI层的研究与开发 【转】蓝牙协议的命令和事件
引擎初始化过程
SeanLin · 2012-03-08 · via 博客园 - SeanLin

1.加载js

CC.loadjs = function(filename)

{

    //add the file to the que

    var script = CC.$new('script');

    script.src = CC.CCDir + filename;

    script.order = CC.loadQue.length;

    CC.loadQue.push(script);

    script.onload = function()

    {

        //file have finished loading,

        //if there is more file to load, we should put the next file on the head

        if(this.order+1 < CC.loadQue.length)

        {

            CC.$('head').appendChild(CC.loadQue[this.order+1]);

        }

        else

        {

            //we are ready to run the game

            CC.AppController.didFinishLaunchingWithOptions();

        }

    };

    if(script.order === 0)//if the first file to load, then we put it on the head

    {

        CC.$('head').appendChild(script);

    }

};

2. 加载成功之后,调用CC.AppController.didFinishLaunchingWithOptions();

3. 开始加载AppDelegate,初始化运行Director,canvas。设置帧率和引擎参数。

4. 创建出具体的scene,并加入Director。

5. 开始主循环的loop。 

先记录这么多,再补充更关键实现方法。