开始 space viking 之旅



安装 cocos2d-v2

目前cocos2d-v3还不太稳定,很多函数还在修改中。 为了稳定起见,我们还是使用 v2

 
 
  1. wget -c http://cocos2d-iphone.googlecode.com/files/cocos2d-iphone-2.1.tar.gz
 
 
  1. //
  2. // BackgroundLayer.m
  3. // cc2
  4. //
  5. // Created by HeJiasheng on 13-11-20.
  6. // Copyright (c) 2013年 HeJiasheng. All rights reserved.
  7. //
  8. #import "BackgroundLayer.h"
  9. @implementation BackgroundLayer
  10. -(id)init {
  11. self = [super init];
  12. if (self != nil) {
  13. CCSprite *backgroundImage = [CCSprite spriteWithFile:@"backgroundiPhone.png"];
  14. CGSize screenSize = [[CCDirector sharedDirector] winSize];
  15. [backgroundImage setPosition:CGPointMake(screenSize.width/2, screenSize.height/2)];
  16. [self addChild:backgroundImage z:0 tag:0];
  17. }
  18. return self;
  19. }
  20. @end
 
 
  1. //
  2. // GameplayLayer.m
  3. // cc2
  4. //
  5. // Created by HeJiasheng on 13-11-20.
  6. // Copyright (c) 2013年 HeJiasheng. All rights reserved.
  7. //
  8. #import "GameplayLayer.h"
  9. @implementation GameplayLayer
  10. -(id)init {
  11. self = [super init];
  12. if (self != nil) {
  13. CCSprite *vikingSprite = [CCSprite spriteWithFile:@"sv_anim_1.png"];
  14. CGSize screenSize = [[CCDirector sharedDirector] winSize];
  15. [vikingSprite setPosition:CGPointMake(screenSize.width/2, screenSize.height/2)];
  16. [self addChild:vikingSprite z:5 tag:0];
  17. }
  18. return self;
  19. }
  20. @end
 
 
  1. //
  2. // GameScene.m
  3. // cc2
  4. //
  5. // Created by HeJiasheng on 13-11-20.
  6. // Copyright (c) 2013年 HeJiasheng. All rights reserved.
  7. //
  8. #import "GameScene.h"
  9. @implementation GameScene
  10. -(id)init {
  11. self = [super init];
  12. if (self != nil) {
  13. BackgroundLayer *backgroundlayer = [BackgroundLayer node];
  14. [self addChild:backgroundlayer z:0];
  15. GameplayLayer *gameplayLayer = [GameplayLayer node];
  16. [self addChild:gameplayLayer z:5];
  17. }
  18. return self;
  19. }
  20. @end
 
 
  1. -(void) onEnter
  2. {
  3. [super onEnter];
  4. //[[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:1.0 scene:[HelloWorldLayer scene] ]];
  5. [[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:1.0 scene:[GameScene node]]];
  6. }

  • 16
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Sure! The Viking Age had a significant impact on Europe and beyond. Here are some of the key ways: 1. Exploration and Trade: The Vikings were skilled seafarers who traveled vast distances, discovering new lands and establishing trade routes. They traded in goods such as furs, timber, and fish, and also brought back luxury goods like silk, spices, and precious metals from their travels. 2. Military Conquest: The Vikings were also known for their military prowess and raided many parts of Europe, leaving a trail of destruction in their wake. They conquered and settled in many areas, including England, Scotland, Ireland, and parts of Russia. 3. Language and Culture: The Vikings had a distinct culture and language that influenced the areas they conquered and settled in. Old Norse words and phrases can still be found in many modern European languages, and traditional Viking art and mythology continue to fascinate people today. 4. Technology and Innovation: The Vikings were skilled at shipbuilding and navigation, and they also developed new weapons and tools. The longship, a type of Viking ship, was particularly innovative and allowed them to travel long distances quickly. 5. Social and Political Changes: The Viking Age also brought about significant social and political changes, with new forms of government and social hierarchy emerging in the areas they conquered and settled in. Overall, the Viking Age had a lasting impact on Europe and the world, shaping language, culture, technology, and politics for centuries to come.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值