![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习笔记
skingtree
这个作者很懒,什么都没留下…
展开
-
protocol 例子
@protocol GameplayLayerDelegate-(void)createObjectOfType:(GameObjectType)objectType withHealth:(int)initialHealth atLocation:(CGPoint)spawnLocation withZV翻译 2012-03-08 16:39:59 · 378 阅读 · 0 评论 -
计算 attack 判定
// Calculate if the Viking is attacking and nearbyif ((vikingState == kStateAttacking) && (CGRectIntersectsRect([self adjustedBoundingBox],vikingBoudingBox))) { if (characterState != k翻译 2012-03-08 17:08:31 · 321 阅读 · 0 评论 -
从plist中读取 animation信息
-(CCAnimation*)loadPlistForAnimationWithName:(NSString*)animationName andClassName:(NSString*)className { CCAnimation *animationToReturn = nil; NSString *fullFileName = [NSString stringWithFor转载 2012-03-08 16:45:02 · 480 阅读 · 0 评论 -
gamelogic scheduleUpdate
@interface GameplayLayer : CCLayer { CCSprite *vikingSprite;SneakyJoystick *leftJoystick;SneakyButton *jumpButton;SneakyButton *attackButton; CCSpriteBatchNode *sceneSpriteBatchNode;}@end翻译 2012-03-09 15:57:28 · 473 阅读 · 0 评论 -
SneakyJoyStick 用法( 兼容universal)
1. import JoystickClasses folder into project2. 在game操作的layer.h import class#import "SneakyJoystick.h"#import "SneakyButton.h"#import "SneakyButtonSkinnedBase.h"#import "SneakyJoy翻译 2012-03-09 17:26:39 · 2919 阅读 · 0 评论 -
cocos2d 57 fonts
http://blog.csdn.net/xiaominghimi/article/details/6651818 李华明Himi 原创,转载务必在明显处注明:【黑米GameDev街区】 原文链接: http://www.himigame.com/iphone-cocos2d/444.html转载 2012-03-10 15:20:38 · 1785 阅读 · 0 评论 -
处理touch + 判断是否碰到sprite
-(void) registerWithTouchDispatcher{ [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:kCCMenuTouchPriority swallowsTouches:NO];} -(BOOL) ccTouchBegan:(UITouch *)touch withE转载 2012-03-10 17:02:12 · 2247 阅读 · 0 评论