分为三步:
-
同步gems mirror
安装rubygems-mirror 原来的rubygems-mirror好像有问题,所以使用@huacnlee改过的gem
按照README.md说明配置.mirrorrc# 国内最好用taobao的源,rubygems经常被墙 --- - from: http://ruby.taobao.org to: /data/rubygems
| --[[ | |
| Why this package? | |
| Cocos2d-x CCNotificationCenter is limited to one lua function callback (observer) per target (CCObject). | |
| This simple Lua script wraps CCNotificationCenter and allows code like: | |
| addObserver(foo,'eventname') | |
| addObserver(foo2,'eventname') | |
| ]]-- | |
| -- The NotificationCenter (nc) table | |
| local nc = { |
| -- LUA协程 | |
| -- http://my.oschina.net/wangxuanyihaha/blog/186401 | |
| -- coroutine.create(f) | |
| -- 函数参数[接受单个参数,这个参数为coroutine的主函数] | |
| -- 函数返回值[返回一个thread对象] | |
| -- 函数作用[创建一个新的协程,协程的主函数定义了该协程内的任务流程] | |
| -- coroutine.resume(co, [, var1, ...]) |
分为三步:
同步gems mirror
安装rubygems-mirror 原来的rubygems-mirror好像有问题,所以使用@huacnlee改过的gem
按照README.md说明配置.mirrorrc
# 国内最好用taobao的源,rubygems经常被墙
---
- from: http://ruby.taobao.org
to: /data/rubygems| ACTION | |
| AD_HOC_CODE_SIGNING_ALLOWED | |
| ALTERNATE_GROUP | |
| ALTERNATE_MODE | |
| ALTERNATE_OWNER | |
| ALWAYS_SEARCH_USER_PATHS | |
| ALWAYS_USE_SEPARATE_HEADERMAPS | |
| APPLE_INTERNAL_DEVELOPER_DIR | |
| APPLE_INTERNAL_DIR | |
| APPLE_INTERNAL_DOCUMENTATION_DIR |
| #pragma mark - touch delegate | |
| - (CGPoint)locationFromTouch:(UITouch *)touch | |
| { | |
| CGPoint touchLocation = [touch locationInView:[touch view]]; | |
| return [[CCDirector sharedDirector]convertToGL:touchLocation]; | |
| } | |
| - (BOOL)containsTouchLocation:(UITouch *)touch | |
| { | |
| CGRect selfRect = CGRectMake(self.position.x, self.position.y, self.contentSize.width, self.contentSize.height); |
| ######################### | |
| # .gitignore file for Xcode4 and Xcode5 Source projects | |
| # | |
| # Apple bugs, waiting for Apple to fix/respond: | |
| # | |
| # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
| # | |
| # Version 2.6 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
| /* | |
| Distributed under The MIT License: | |
| http://opensource.org/licenses/mit-license.php | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to |
| require 'lubyk' | |
| -- Box2D bindings are not yet in published but code will look the same | |
| -- (18.1.2012) | |
| local function makeBody(x, y, r, hue) | |
| -- Define the dynamic body. We set its position and call the body factory. | |
| local bodyDef = b2.BodyDef() | |
| bodyDef.type = b2.dynamicBody | |
| bodyDef.position:Set(x, y) |