Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| - (void)turnCard | |
| { | |
| if ([self isFaceUp]) { | |
| [self flipHide]; | |
| self.faceUp = NO; | |
| } else { | |
| self.faceUp = YES; | |
| [self flipReveal]; | |
| } | |
| } |
| // Feel free to use. MIT License | |
| #import <Foundation/Foundation.h> | |
| #import "cocos2d.h" | |
| // Layer that will just capture any touch events on it | |
| @interface OpaqueLayer : CCLayerColor { | |
| } |
| void Card::flipAction() { | |
| CCSize winSize = CCDirector::sharedDirector()->getWinSize(); | |
| CCSprite* card = CCSprite::spriteWithFile("card_face.png"); | |
| card->setPosition(ccp(winSize.width/2, winSize.height/2)); | |
| this->addChild(card, CARD_FACE_TAG, CARD_FACE_TAG); | |
| card->setVisible(false); | |
| CCSprite* card2 = CCSprite::spriteWithFile("card.png"); | |
| card2->setPosition(card->getPosition()); |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| ######################### | |
| # .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.3 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |
| // this code will cause a UIView to shake--good for "login error" | |
| CAKeyframeAnimation * anim = [ CAKeyframeAnimation animationWithKeyPath:@"transform" ] ; | |
| anim.values = [ NSArray arrayWithObjects: | |
| [ NSValue valueWithCATransform3D:CATransform3DMakeTranslation(-5.0f, 0.0f, 0.0f) ], | |
| [ NSValue valueWithCATransform3D:CATransform3DMakeTranslation(5.0f, 0.0f, 0.0f) ], | |
| nil ] ; | |
| anim.autoreverses = YES ; | |
| anim.repeatCount = 2.0f ; | |
| anim.duration = 0.07f ; |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| __author__ = 'dhcdht' | |
| import os | |
| import re | |
| plugin_path = os.path.expanduser('~/Library/Application Support/Developer/Shared/Xcode/Plug-ins') | |
| #for Xcode 6.3 | |
| #plugin_uuid = '9F75337B-21B4-4ADC-B558-F9CADF7073A7' | |
| #for Xcode 6.3.2 | |
| #plugin_uuid = 'E969541F-E6F9-4D25-8158-72DC3545A6C6' |
| # Switch xcrun to leverage Xcode 7 | |
| # Note: This won't be needed once Xcode 7 is released | |
| # and becomes the primary Xcode in use. | |
| export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer/ | |
| # Export Archive | |
| xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath /path/to/app.xcarchive -exportPath /path/to/app.ipa |
| ACTION = build | |
| AD_HOC_CODE_SIGNING_ALLOWED = NO | |
| ALTERNATE_GROUP = staff | |
| ALTERNATE_MODE = u+w,go-w,a+rX | |
| ALTERNATE_OWNER = grantdavis | |
| ALWAYS_SEARCH_USER_PATHS = NO | |
| ALWAYS_USE_SEPARATE_HEADERMAPS = YES | |
| APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer | |
| APPLE_INTERNAL_DIR = /AppleInternal | |
| APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation |