Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
noliv committed Jan 27, 2013
1 parent b9bb649 commit 7d8c170
Show file tree
Hide file tree
Showing 13 changed files with 2,880 additions and 11 deletions.
8 changes: 8 additions & 0 deletions GGJ13/Drugs&Rock.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
B541433D16B36935000E45B8 /* WHPartition.m in Sources */ = {isa = PBXBuildFile; fileRef = B541433C16B36934000E45B8 /* WHPartition.m */; };
B541435016B3C841000E45B8 /* WHItem.m in Sources */ = {isa = PBXBuildFile; fileRef = B541434F16B3C841000E45B8 /* WHItem.m */; };
B541435316B3E601000E45B8 /* WHControlLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = B541435216B3E601000E45B8 /* WHControlLayer.m */; };
B5CEAE1B16B570C5006AFA22 /* win.png in Resources */ = {isa = PBXBuildFile; fileRef = B5CEAE1A16B570C5006AFA22 /* win.png */; };
B5CEAE1D16B573FB006AFA22 /* blank.png in Resources */ = {isa = PBXBuildFile; fileRef = B5CEAE1C16B573FB006AFA22 /* blank.png */; };
B5D8FDC316B48B47005C0702 /* OALAction.m in Sources */ = {isa = PBXBuildFile; fileRef = B5D8FD8316B48B47005C0702 /* OALAction.m */; };
B5D8FDC416B48B47005C0702 /* OALActionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B5D8FD8516B48B47005C0702 /* OALActionManager.m */; };
B5D8FDC516B48B47005C0702 /* OALAudioActions.m in Sources */ = {isa = PBXBuildFile; fileRef = B5D8FD8716B48B47005C0702 /* OALAudioActions.m */; };
Expand Down Expand Up @@ -460,6 +462,8 @@
B541434F16B3C841000E45B8 /* WHItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHItem.m; sourceTree = "<group>"; };
B541435116B3E601000E45B8 /* WHControlLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WHControlLayer.h; sourceTree = "<group>"; };
B541435216B3E601000E45B8 /* WHControlLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHControlLayer.m; sourceTree = "<group>"; };
B5CEAE1A16B570C5006AFA22 /* win.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = win.png; path = Resources/win.png; sourceTree = "<group>"; };
B5CEAE1C16B573FB006AFA22 /* blank.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = blank.png; path = Resources/blank.png; sourceTree = "<group>"; };
B5D8FD8116B48B47005C0702 /* OALAction+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "OALAction+Private.h"; sourceTree = "<group>"; };
B5D8FD8216B48B47005C0702 /* OALAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OALAction.h; sourceTree = "<group>"; };
B5D8FD8316B48B47005C0702 /* OALAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OALAction.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -633,6 +637,7 @@
324254BC168DDFB40050EDD1 /* Resources */ = {
isa = PBXGroup;
children = (
B5CEAE1C16B573FB006AFA22 /* blank.png */,
32FB553716B5538900F1CB4E /* buzz.caf */,
32FB553816B5538900F1CB4E /* Click.caf */,
32FB553916B5538A00F1CB4E /* ECGFast.caf */,
Expand Down Expand Up @@ -713,6 +718,7 @@
324254D1168DDFB40050EDD1 /* [email protected] */,
324254D3168DDFB40050EDD1 /* Info.plist */,
324254D4168DDFB40050EDD1 /* iTunesArtwork */,
B5CEAE1A16B570C5006AFA22 /* win.png */,
);
name = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -1334,6 +1340,8 @@
32FB554416B5538C00F1CB4E /* Swoosh2.caf in Resources */,
32FB554516B5538C00F1CB4E /* Swoosh3.caf in Resources */,
32FB554616B5538C00F1CB4E /* Swoosh4.caf in Resources */,
B5CEAE1B16B570C5006AFA22 /* win.png in Resources */,
B5CEAE1D16B573FB006AFA22 /* blank.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
1,444 changes: 1,444 additions & 0 deletions GGJ13/Drugs&Rock.xcodeproj/project.pbxproj.orig

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GGJ13/WHGameLayer.mm"
timestampString = "380984682.860966"
timestampString = "380988438.311059"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "156"
endingLineNumber = "156"
startingLineNumber = "164"
endingLineNumber = "164"
landmarkName = "-newItem:atLane:"
landmarkType = "5">
</FileBreakpoint>
Expand All @@ -34,11 +34,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GGJ13/WHGameLayer.mm"
timestampString = "380984682.860966"
timestampString = "380988438.311059"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "138"
endingLineNumber = "138"
startingLineNumber = "142"
endingLineNumber = "142"
landmarkName = "-tick:"
landmarkType = "5">
</FileBreakpoint>
Expand All @@ -47,11 +47,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GGJ13/WHGameLayer.mm"
timestampString = "380984899.788006"
timestampString = "380988438.311059"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "139"
endingLineNumber = "139"
startingLineNumber = "143"
endingLineNumber = "143"
landmarkName = "-tick:"
landmarkType = "5">
</FileBreakpoint>
Expand Down
Binary file added GGJ13/GGJ13/Resources/blank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions GGJ13/GGJ13/WHGameLayer.mm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ -(void) tick: (ccTime) dt
[self.partition goToNextItem];
}

if ([self.partition nextItemTimestamp] == 0.0f) {
[self scheduleOnce:@selector(forceRestart) delay:[self adjustedDuration]+0.2f];

}

if ([self.activeItems count]>0){
WHItem *item = (WHItem *)[self.activeItems objectAtIndex:0];
Expand Down Expand Up @@ -149,6 +153,10 @@ -(void) tick: (ccTime) dt
}
}

-(void)forceRestart {
[self.gameScene executeNewZique];
}


-(void) newItem:(ItemType)itemType atLane: (int)itemLane
{
Expand Down
2 changes: 1 addition & 1 deletion GGJ13/GGJ13/WHGameScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
-(void) updateJaugeWith:(int)statut;
-(void) sendDrug:(int)itemType;
-(void) displayMessage:(int)m;

-(void) executeNewZique;

+(WHGameScene *) scene:(int)m;

Expand Down
22 changes: 21 additions & 1 deletion GGJ13/GGJ13/WHGameScene.mm
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ -(void) updateJaugeWith:(int)statut {
}

-(void) sendDrug:(int)itemType {
NSLog(@"Envoi de drogue à l’autre connard: type %d",itemType);
// NSLog(@"Envoi de drogue à l’autre connard: type %d",itemType);
[self sendSocketWithKey:@"faitmanger" andValue:[NSString stringWithFormat:@"%d",itemType]];
}

Expand Down Expand Up @@ -412,6 +412,7 @@ -(void) displayMessage:(int)m {
case 2:
image = @"lsd.png";
son = @"";
// [self scheduleOnce:@selector(lsdGlowingEffect) delay:0.3f];
break;
case 3:
image = @"ghb.png";
Expand All @@ -438,5 +439,24 @@ - (void) removeMessage:(ccTime) dt {
[headerLayer removeChildByTag:13 cleanup:true];
}

- (void)lsdGlowingEffect {
//fixme
// élément blanc à glower
CGSize s = [CCDirector sharedDirector].winSize;

CCSprite *sprite = [self rectangleSpriteWithSize:CGSizeMake(s.width, s.height) color:ccc3(255, 255, 255)];

sprite.position = ccp(s.width/2.0f,s.height/2.0f);

[self addChild:sprite];
}

-(CCSprite *) rectangleSpriteWithSize:(CGSize)cgsize color:(ccColor3B) c
{
CCSprite *sg = [CCSprite spriteWithFile:@"blank.png"];
[sg setTextureRect:CGRectMake( 0, 0, cgsize.width, cgsize.height)];
sg.color = c;
return sg;
}

@end
Loading

0 comments on commit 7d8c170

Please sign in to comment.