Browse Source

Added ressources

master
parent
commit
149f30ed57
  1. 1
      .gitignore
  2. BIN
      Resources/Oeil.sketch/Data
  3. BIN
      Resources/Oeil.sketch/QuickLook/Preview.pdf
  4. BIN
      Resources/Oeil.sketch/QuickLook/Thumbnail.jpg
  5. 3
      Resources/config-resize
  6. BIN
      Resources/explode.png
  7. BIN
      Resources/explode.sketch/Data
  8. BIN
      Resources/explode.sketch/QuickLook/Preview.pdf
  9. BIN
      Resources/explode.sketch/QuickLook/Thumbnail.jpg
  10. BIN
      Resources/level01.sketch/Data
  11. BIN
      Resources/level01.sketch/QuickLook/Preview.pdf
  12. BIN
      Resources/level01.sketch/QuickLook/Thumbnail.jpg
  13. BIN
      Resources/pentacleOne.png
  14. BIN
      Resources/pentacleOne.sketch/Data
  15. BIN
      Resources/pentacleOne.sketch/QuickLook/Preview.pdf
  16. BIN
      Resources/pentacleOne.sketch/QuickLook/Thumbnail.jpg
  17. BIN
      Resources/pentacleOneBullet.png
  18. BIN
      Resources/pentacleOneBullet.sketch/Data
  19. BIN
      Resources/pentacleOneBullet.sketch/QuickLook/Preview.pdf
  20. BIN
      Resources/pentacleOneBullet.sketch/QuickLook/Thumbnail.jpg
  21. BIN
      Yog-Shot-Oth.xcodeproj/project.xcworkspace/xcuserdata/esposito.xcuserdatad/UserInterfaceState.xcuserstate
  22. 25
      Yog-Shot-Oth.xcodeproj/xcuserdata/esposito.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  23. 26
      Yog-Shot-Oth/EnemyBullet.h
  24. 56
      Yog-Shot-Oth/EnemyBullet.m
  25. BIN
      Yog-Shot-Oth/Resources/sprites/ange-hd.png
  26. BIN
      Yog-Shot-Oth/Resources/sprites/ange.png

1
.gitignore

@ -1 +1,2 @@
.DS_Store
*.swp

BIN
Resources/Oeil.sketch/Data

Binary file not shown.

BIN
Resources/Oeil.sketch/QuickLook/Preview.pdf

Binary file not shown.

BIN
Resources/Oeil.sketch/QuickLook/Thumbnail.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

3
Resources/config-resize

@ -8,3 +8,6 @@ Vaisseau.png 100
Yogsototh.png 260
Ange.png 30
Soggoth.png 145
pentacleOne.png 70
pentacleOneBullet.png 8
explode.png 100

BIN
Resources/explode.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
Resources/explode.sketch/Data

Binary file not shown.

BIN
Resources/explode.sketch/QuickLook/Preview.pdf

Binary file not shown.

BIN
Resources/explode.sketch/QuickLook/Thumbnail.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
Resources/level01.sketch/Data

Binary file not shown.

BIN
Resources/level01.sketch/QuickLook/Preview.pdf

Binary file not shown.

BIN
Resources/level01.sketch/QuickLook/Thumbnail.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
Resources/pentacleOne.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
Resources/pentacleOne.sketch/Data

Binary file not shown.

BIN
Resources/pentacleOne.sketch/QuickLook/Preview.pdf

Binary file not shown.

BIN
Resources/pentacleOne.sketch/QuickLook/Thumbnail.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
Resources/pentacleOneBullet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
Resources/pentacleOneBullet.sketch/Data

Binary file not shown.

BIN
Resources/pentacleOneBullet.sketch/QuickLook/Preview.pdf

Binary file not shown.

BIN
Resources/pentacleOneBullet.sketch/QuickLook/Thumbnail.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
Yog-Shot-Oth.xcodeproj/project.xcworkspace/xcuserdata/esposito.xcuserdatad/UserInterfaceState.xcuserstate

Binary file not shown.

25
Yog-Shot-Oth.xcodeproj/xcuserdata/esposito.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist

@ -2,4 +2,29 @@
<Bucket
type = "1"
version = "1.0">
<FileBreakpoints>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "Yog-Shot-Oth/MainLayer.m"
timestampString = "351384020.739438"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "170"
endingLineNumber = "170"
landmarkName = "-removeEnemy:"
landmarkType = "5">
<Actions>
<BreakpointActionProxy
ActionType = "Xcode.BreakpointAction.Log">
<ActionContent
message = "remove enemy called"
conveyanceType = "0">
</ActionContent>
</BreakpointActionProxy>
</Actions>
</FileBreakpoint>
</FileBreakpoints>
</Bucket>

26
Yog-Shot-Oth/EnemyBullet.h

@ -0,0 +1,26 @@
//
// Bullet.h
// Yog-Shot-Oth
//
// Created by Yann Esposito on 14/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "CCNode.h"
#import "cocos2d.h"
#import "MainLayer.h"
@interface Bullet : CCNode
{
MainLayer *parentLayer;
CCSprite *sprite;
CGSize winSize;
CGPoint speed;
int collisionDistance;
}
@property (assign) MainLayer *father;
- (id)initWithStartPosition:(CGPoint)fromPosition toPosition:(CGPoint)toPosition withSpeed:(CGFloat)speed andMainLayer:(MainLayer*)mainLayer;
- (void)update:(ccTime)dt;
@end

56
Yog-Shot-Oth/EnemyBullet.m

@ -0,0 +1,56 @@
//
// Bullet.m
// Yog-Shot-Oth
//
// Created by Yann Esposito on 14/11/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "geometry.h"
#import "Bullet.h"
#import "Starship.h"
@implementation Bullet
@synthesize father;
- (id)initWithStartPosition:(CGPoint)fromPosition toPosition:(CGPoint)toPosition withSpeed:(CGFloat)initSpeed andMainLayer:(MainLayer *)mainLayer {
self = [super init];
if (self) {
father = mainLayer;
// Position randomly
CCTexture2D *texture = [[CCTextureCache sharedTextureCache] addImage:@"Bullet.png"];
sprite = [[CCSprite alloc] initWithTexture:texture];
sprite.position = fromPosition;
collisionDistance=sprite.boundingBoxInPixels.size.width / 2;
CGPoint direction = ccpNormalize(ccpSub(toPosition, fromPosition));
speed = ccpMult(direction, initSpeed);
[self addChild:sprite];
}
return self;
}
- (void)update:(ccTime)dt {
// update position
sprite.position = ccpAdd(sprite.position, ccpMult(speed,dt));
// detect collision
CGPoint vectFromSpriteToStarship = ccpSub(father.starship.position, sprite.position);
if (ccpLength(vectFromSpriteToStarship) < collisionDistance) {
[father colisionOccured];
}
// detect out of windows
sprite.position = ccpAdd(sprite.position, speed);
if (outOfWindow(sprite.position, sprite.boundingBox.size, father.winSize)) {
[father removeBullet:self];
}
}
- (void) dealloc
{
[sprite release];
[super dealloc];
}
@end

BIN
Yog-Shot-Oth/Resources/sprites/ange-hd.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
Yog-Shot-Oth/Resources/sprites/ange.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 592 B

Loading…
Cancel
Save