Hello, Ladies and Gents!
How's it been rolling? It's been some time and I really saw the necessity do register this.
So there I was downloading a FLAC file and all of a sudden it just hit me: "How the hell am I gonna listed to this if iTunes doesn't do this type of file".
So I went out on a hunt. Found a few options. Ones were good but pay-for-use-with-rediculous-30-secound-trial, other just converter the bloody file all in one. So I needed a converter that would handle my shit (convert and separate) and that's when I came across this bad boy here:
Media Human Audio Converter: http://www.mediahuman.com/audio-converter/
It doesn't inspire with it's name but it does it brilliantly. So if you're in look for something light-weighted, powerful and easy to use this is the one you should you.
Cheers!
Showing posts with label EASY. Show all posts
Showing posts with label EASY. Show all posts
Wednesday, August 26, 2015
Monday, May 14, 2012
Cocos2d/Gamecenter: How to implement correctly GameCenter into Cocos2d
Hi,
How's it going there?
Here's a tutorial that i saw loads of people having the same problem and after some research I figured it out.
I don't know if it's the ideal way, but as it worked I can suit you.
Cocos2D: 1.0.1
What was the problem that it wouldn't work?
R: For some reason the RootViewController wasn't referenced and so it gave me a 12h delay on the project.
Step 1:
Go to you AppDelegate.h
#import <UIKit/UIKit.h>
@class RootViewController;
@interface AppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
RootViewController *viewController;
}
@property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retain) RootViewController *viewController;
@end
Step 2:
Go to your AppDelegate.m
#import "cocos2d.h"
#import "AppDelegate.h"
#import "RootViewController.h"
@implementation AppDelegate
@synthesize window;
@synthesize viewController;
- (void) applicationDidFinishLaunching:(UIApplication*)application
{
// Init the window
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
window.rootViewController = viewController;
//blablablá
// Init the View Controller
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
viewController.wantsFullScreenLayout = YES;
}
Step 3:
Import GameKit.framework
Step 4:
Implement some code.
I'm going to put only some basic stuff and of course the most important the leaderboard.
-(void)localUserAuthentication{
GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
[localPlayer authenticateWithCompletionHandler:^(NSError *error) {
if (!error){
isLocalUserAuthenticated = YES;
//NSLog(@"AUTHETICATION SUCCEDED");
} else {
isLocalUserAuthenticated = NO;
//NSLog(@"AUTHETICATION FAILED");
}
}];
}
-(void)showLeaderboard{
GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init];
if (leaderboardController != NULL) {
leaderboardController.category = @"com.yourcompany.gamename.leaderboard.whatleaderboard";
leaderboardController.timeScope =GKLeaderboardTimeScopeAllTime;
leaderboardController.leaderboardDelegate = self;
AppDelegate *delegate = [UIApplication sharedApplication].delegate;
[delegate.viewController presentModalViewController:leaderboardController animated:YES];
}
leaderboardController.toolbar.autoresizesSubviews = YES;
leaderboardController.view.bounds = CGRectMake(0, 0, 480, 320);
leaderboardController.view.transform = CGAffineTransformMakeRotation(CC_DEGREES_TO_RADIANS(90));
}
-(void)leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController{
CCMenu* gamemenu = (CCMenu*)[self getChildByTag:kGameMenu];
gamemenu.isTouchEnabled = YES;
[self show];
AppDelegate *delegate = [UIApplication sharedApplication].delegate;
[delegate.viewController dismissModalViewControllerAnimated:YES];
}
Well, so that's that.
If you guys need any help, just get in contact.
Hasta luego.
If you guys need any help, just get in contact.
Hasta luego.
Labels:
CENTER,
COCOS2D,
EASY,
GAME,
GAMECENTER,
OBJECTIVE-C,
ORIENTATION,
PROBLEMS,
QUICK,
VIEWCONTROLLER
Location:
Sao Paulo - São Paulo, Brazil
Subscribe to:
Posts (Atom)