This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UpdateLayer.cpp | |
// prevent touch propagation to other layers | |
// cocos2d-1.0.1-x-0.9.1 | |
void UpdateLayer::onEnter() | |
{ | |
CCLayer::onEnter(); | |
CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, 0, true); | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
u""" | |
Upscales a Tiled TMX map for use with a retina display. | |
Fixes tile size, object position and size, image size. | |
Saves the retina file as filename-hd.tmx in the same folder as the source file. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CCSpriteFrameCache_SWF.h | |
// CCSpriteFrameCache_SWF_Extension | |
// | |
// Created by Salvatore Gionfriddo on 11/28/11. | |
// Copyright (c) 2011 Taco Graveyard. All rights reserved. | |
// | |
#include <vg/openvg.h> | |
#include <vg/vgu.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Lightning.h | |
// Trundle | |
// | |
// Created by Robert Blackwood on 12/1/09. | |
// Copyright 2009 Mobile Bros. All rights reserved. | |
// | |
#import "cocos2d.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "hello2" | |
cocos2d.CCLuaLog("result is " .. myadd(3, 5)) | |
-- create scene & layer | |
layerFarm = cocos2d.CCLayer:node() | |
layerFarm:setIsTouchEnabled(true) | |
layerMenu = cocos2d.CCLayer:node() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// GFFParallaxNode.h | |
// | |
// Created by Rolando Abarca on 12/14/09. | |
// | |
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
#define MAX_PARALLAX_CHILDREN 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
@interface CCSpriteFrameCache (SWF) | |
-(void) addSpriteFramesWithSWF:(NSString*)filename; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NSString(ColorAdditions) | |
-(NSColor*)hexStringToNSColor; | |
@end | |
@implementation NSString(ColorAdditions) | |
-(NSColor *) hexStringToNSColor { | |
unsigned int c; | |
if ([self characterAtIndex:0] == '#') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)openHighScoreView { | |
GameOverView *tempView = [[HighScoreView alloc] init]; | |
selfish = tempView; | |
[tempView release]; | |
[[CCDirector sharedDirector]replaceScene:[MainScene node]]; | |
[UIView beginAnimations:nil context:NULL]; | |
[UIView setAnimationDuration:.5]; | |
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:[[CCDirector sharedDirector] openGLView] cache:YES]; | |
[[[CCDirector sharedDirector] openGLView] addSubview:go.view]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)turnCard | |
{ | |
if ([self isFaceUp]) { | |
[self flipHide]; | |
self.faceUp = NO; | |
} else { | |
self.faceUp = YES; | |
[self flipReveal]; | |
} | |
} |