自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 资源 (4)
  • 收藏
  • 关注

原创 viewController 各个life cycle阶段,view和 subviews 的frame 状态分析

2013-03-27 17:04:40.605 testView[4685:c07] --- viewDidLoad.. ---2013-03-27 17:04:40.608 testView[4685:c07] >2013-03-27 17:04:40.609 testView[4685:c07] ; layer = ; contentOffset: {0, 0}>201

2013-03-27 17:20:11 3839

原创 我是谁?

skingtree一名个人开发者涉猎iOS有两年我想从今天起,把一些经验分享出来。如果大家对某个话题感兴趣,可以联系我。谢谢。

2013-03-27 17:07:32 1949

原创 数值策划搜集

0.06*d/(1+0.06*d)  d是防御值职业:  我一共设计了5个职业,为了大家理解上能直观一些,我借用《魔兽世界》的职业术语,将这5个职业称为防御战士,法师,牧师,武器战士,猎人。并将各个职业的定位设计如下:  职业一:防御战士,近程物理伤害职业,天生的坦克,拥有极高的HP,极低的MP,极高的物理防御,中等的魔法防御,没有恢复能力,输出能力较差,在PK中被远程高伤害的

2012-04-02 16:00:57 1980

翻译 App ID & Game Center - II (代码部分)

Game Center 需要 target iOS在 4.1及以上- (BOOL)isGameCenterAvailable{// Check for presence of GKLocalPlayer API Class gcClass = (NSClassFromString(@"GKLocalPlayer"));// Check if the device is r

2012-03-30 17:34:54 3365

翻译 App ID & Game Center - I

An App ID is the combination of a unique ten character string called the "Bundle Seed ID" and a traditional CF Bundle ID (or Bundle Identifier).App ID 的意义在于区别iOS中两个不同的APP。Bundle Seed ID 是一

2012-03-30 17:01:27 3721

翻译 处理 角色翻转 + particle

// Chapter 14 Updates for Particle System GameCharacter *spaceCargoShip = (GameCharacter*) [sceneSpriteBatchNode getChildByTag:kEnemyTypeSpaceCargoShip]; if (spaceCargoShip != nil) {

2012-03-30 10:15:19 2123

翻译 cocos2d scheduler 的优势

与NSTimer 相比,scheduler有这些好处-scheduler 会随着cocos2d的 pause/resume 而暂停/恢复所以做暂停的功能就方便了    - CCNode 如果 visible = NO, 或者removed了,scheduler会自动deactivated。否则,如果某个set了timer的object被deallocate了,t

2012-03-16 18:22:48 2107

翻译 实现分析 - Enemy

启动addEnemy的循环Listing 5.18 GameplayLayer.m init method additions[self schedule:@selector(addEnemy) interval:10.0f]; addEnemy 作为对外的入口 - 内部统一用 createObjectOfType 来处理 如果XXX (不再加入Enemy了),unsched

2012-03-16 16:53:35 2036

原创 角度 Angle

CGPoint vector = ccpSub( creep.mySprite.position,touchLocation); CGFloat vectorAngle = ccpToAngle(vector); int speed = 100; CCMoveBy *creepMove = [CCMoveBy actionWithDuration:0.5 p

2012-03-15 21:39:24 2098

翻译 实现分析 - Enemy part2

-(void)changeState:(CharacterStates)newState {if (characterState == kStateDead)return; // No need to change state further once I am dead[self stopAllActions];id action = nil;characterState = new

2012-03-15 18:32:06 2113

翻译 关于旋转

[self runAction:[CCFadeOut actionWithDuration:0.0f]];// Fades out the sprite if it was visible before [self setDisplayFrame: [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameB

2012-03-14 11:24:21 1836

翻译 创建 和使用 CCAnimation

1- 直接加载图片文件作为frameCCAnimation *robotAnim = [CCAnimation animation]; // 4[robotAnim addFrameWithFilename:@"an1_anim2.png"]; // 5[robotAnim addFrameWithFilename:@"an1_anim3.png"];[robotAnim addFr

2012-03-14 11:06:52 2589

翻译 enemy 视野 实现

-(CGRect)eyesightBoundingBox { // Eyesight is 3 robot widths in the direction the robot is facing.CGRect robotSightBoundingBox;CGRect robotBoundingBox = [self adjustedBoundingBox];if ([self fli

2012-03-13 18:59:48 1980

翻译 让sprite 循环跑

id action = [CCRepeatForever actionWithAction: [CCSequence actions: [CCDelayTime actionWithDuration:2.0f], [CCMoveTo actionWithDuration:0.01f posit

2012-03-13 16:56:45 2029

翻译 Game Update 逻辑处理 - 整理中

- 初始化时都加到一个batchNode中3- 循环list中每一个object (这里定义了一个抽象类 GameCharacter,实现类有自己的实现方法)    每个object都对list遍历一次,检测是否有交互。#pragma mark –#pragma mark Update Method-(void) update:(ccTime)deltaTime { CC

2012-03-13 16:53:12 2283

转载 像素图教程

http://v.youku.com/v_show/id_XMjAyNjc0NTgw.html

2012-03-12 16:34:52 2088

转载 IOS ICON 圆角半径

iTunes Artwork icon ───────────────────────── 512px (90px)App icon(iPhone4) ────────────────────────── 114px (20px)App icon(iPad) ───────────────────────────── 72px (12px)App icon(iPhone 3G/3GS)

2012-03-12 12:04:33 9927

转载 处理touch + 判断是否碰到sprite

-(void) registerWithTouchDispatcher{ [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:kCCMenuTouchPriority swallowsTouches:NO];} -(BOOL) ccTouchBegan:(UITouch *)touch withE

2012-03-10 17:02:12 2256

转载 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 1790

翻译 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 2925

翻译 gamelogic scheduleUpdate

@interface GameplayLayer : CCLayer { CCSprite *vikingSprite;SneakyJoystick *leftJoystick;SneakyButton *jumpButton;SneakyButton *attackButton; CCSpriteBatchNode *sceneSpriteBatchNode;}@end

2012-03-09 15:57:28 480

翻译 计算 attack 判定

// Calculate if the Viking is attacking and nearbyif ((vikingState == kStateAttacking) && (CGRectIntersectsRect([self adjustedBoundingBox],vikingBoudingBox))) { if (characterState != k

2012-03-08 17:08:31 327

转载 从plist中读取 animation信息

-(CCAnimation*)loadPlistForAnimationWithName:(NSString*)animationName andClassName:(NSString*)className { CCAnimation *animationToReturn = nil; NSString *fullFileName = [NSString stringWithFor

2012-03-08 16:45:02 487

翻译 protocol 例子

@protocol GameplayLayerDelegate-(void)createObjectOfType:(GameObjectType)objectType withHealth:(int)initialHealth atLocation:(CGPoint)spawnLocation withZV

2012-03-08 16:39:59 385

原创 delegate 的理解

delegate 是与subclass 实现扩展的另一种方式。一个subclass类的行为在其编译时候就确定下来了。但有些时候,希望一个类的行为在不同情况下(用户交互,不同状态时),是runtime flexibility的。这时候选择delegate更加合适。例如NSWindow,在某些情况下,希望“关闭-close”能执行不同的处理。(可能是,保存,刷新另一个界面等

2012-03-07 18:03:58 519

翻译 CCAnimationCache

CCAnimationCache 可以用来保存CCSprite的图像。 如果有一大批CCSprite要操作,缓存到Cache中比每次都创建要高效很多。例子:射击游戏,TD 等等注意1:如果从CCAnimationCache中取回animation,记得检查返回值是否为nil。因为CCAnimationCache可能会回收(perge)animation,如果 purgeShar

2012-03-06 17:30:40 3314

翻译 For iphone3GS and older

GameConfig.h file// For iPhone 3GS and newer, comment out for Space Viking//#define GAME_AUTOROTATION kGameAutorotationUIViewController// For iPhone 3G and older (runs better)#define GAME_AUTOROTA

2012-03-05 18:23:15 410

翻译 适应不同的设备

CCSpriteBatchNode *chapter2SpriteBatchNode; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"scen

2012-03-05 17:59:36 338

翻译 cocos2d Game Scene

GameScene 要负责处理:屏幕显示,用户交互Frame-Based :基于每帧的方式计算是最简单的。每一个被调用的循环会 更新+渲染 游戏内容。问题:慢的设备可能会让游戏看起来变慢 (设备的frame会变慢)Time-Based:基于时间的方式由于每个循环的时间是不确定的,

2012-03-05 17:19:02 363

原创 test

http://zhcn.admob.com/公司的网络很封闭,难得CSDN的博客可以用。暂时,就在这里安家吧。我是一IDP,个人开发者。热忱于cocos2d游戏开发,欢迎大家拍砖。

2012-03-02 17:53:58 196

Learning Cocos2D - Ray Wenderlich

Ray Wenderlich 的 Learning Cocos2D 英文版。

2012-03-02

xcode 快捷键 一页

xcode 重要快捷键描述 文档共一页 方便打印

2010-02-01

ajax design pattern by O'Reilly

<<ajax design pattern.>> Publisher: O'Reilly Pub Date: June 2006 format:chm

2009-04-16

电子邮件实现方法电子邮件实现方法电子邮件实现方法

获取用户输入的信息 对于用户输入内容获取功能是通过getParameter方法来实现的,对于输入的文本内容,通过如下代码就能在服务器端获取,程序代码如下: String username=request.getParameter("login");String password=request.getParameter("password");Session session2=Session.getInstance(System.getProperties() ,null);Store store=session2.getStore("pop3");

2008-10-06

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除