上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 43 下一页
摘要: 如果对一个A sprite添加触控,然后在一个场景中创建四个A的实例,那么1234逐个添加的话,只有最后一个会被点击到。其他的将不会响应。 阅读全文
posted @ 2015-11-26 22:05 yufenghou 阅读(134) 评论(0) 推荐(0)
摘要: ``` /** * Created by sun on 15/11/24. */ var Piece = cc.Sprite.extend({ ctor:function (num) { this._super(); if(num==0) { this.initWithFile(res.piece_00_... 阅读全文
posted @ 2015-11-24 16:43 yufenghou 阅读(140) 评论(0) 推荐(0)
摘要: apk 配置环境变量 打开"终端",输入"pico .bash_profile"命令 export ANDROID_SDK_ROOT=/Users/sun/Documents/adt bundle mac x86_64 20140702/sdk export ANDROID_NDK_ROOT... 阅读全文
posted @ 2015-11-23 14:06 yufenghou 阅读(226) 评论(0) 推荐(0)
摘要: ``` #ifndef __test__Singleton__ #define __test__Singleton__ #include class Singleton{ public: static Singleton* getInstance(); private: Singleton(); static Singleton* instance; }; #endif ``... 阅读全文
posted @ 2015-11-14 16:41 yufenghou 阅读(79) 评论(0) 推荐(0)
摘要: 策略模式:它定义了算法家族,分别封装起来,让他们之间可以互相替换,此模式让算法变化,不会影响到使用算法的客户。 阅读全文
posted @ 2015-11-14 11:18 yufenghou 阅读(132) 评论(0) 推荐(0)
摘要: 工厂模式 阅读全文
posted @ 2015-11-14 09:52 yufenghou 阅读(138) 评论(0) 推荐(0)
摘要: ``` class TestSingleton : public CCLayer { public: static TestSingleton* getInstance();//创建一个全局访问点,例如我们常用的Director::getInstance()就是这样一个单例 void test();//测试单例时用到。 private: static TestSi... 阅读全文
posted @ 2015-11-08 10:08 yufenghou 阅读(124) 评论(0) 推荐(0)
摘要: 1 1.1 将tiledmap 保存为xml格式 1.2 在unity当中设置摄像机为“Orthogonal”, 1.3 拖拽tiledmap prefab从project视图到Hierarchy视图 1.4 点击TiledMap Game Object 调整Target Size 1... 阅读全文
posted @ 2015-11-03 15:25 yufenghou 阅读(196) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2015-10-03 17:24 yufenghou 阅读(1) 评论(0) 推荐(0)
摘要: ```lualocal MainScene = class("MainScene", function() return display.newScene("MainScene")end)function MainScene:ctor() cc.ui.UIPushButton.new("... 阅读全文
posted @ 2015-08-09 18:34 yufenghou 阅读(302) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 43 下一页