Search Results

Search found 12 results on 1 pages for 'micropsari'.

Page 1/1 | 1 

  • Can we change dynamically the interval of "schedule" ?

    - by micropsari
    Hello, I'm making a game on iPhone using cocos2d, and I have a question. In my init method I'm doing this : [self schedule:@selector(newMonster:) interval:1]; It create a new monster every second. But I'd like that the interval change over time. For example : -The 10 first seconds of the game: a new monster appears every 1 second. -Then for 10 seconds: a new monster appears every 0.8 second. -And after every 0.5 second... How can I do that? Thanks !

    Read the article

  • The simplest way to resize an UIImage ?

    - by micropsari
    Hello ! In my iPhone app, I take a picture with the camera, then I want to resize it to 290*390 pixels. I was using this method to resize the image : UIImage *newImage = [image _imageScaledToSize:CGSizeMake(290, 390) interpolationQuality:1]; It works perfectly, but it's an undocumented function, so I can't use it anymore with iPhone OS4. So... what is the simplest way to resize an UIImage ? Thanks !

    Read the article

  • How can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4?

    - by micropsari
    Hello, I just finish my iPhone game using cocos2d. But before I put it on the AppStore, I'd like to make it work on iPad (which have a bigger screen) and iPhone 4 (which have a bigger resolution). So, how can I determine programmatically that my app is running on an iPhone, iPad or iPhone 4, to be able to use the correct coordinates / images in my game? Thanks for your help!

    Read the article

  • Where to start openGL ES to create and rotate a cube in an iPhone?

    - by micropsari
    Hello. I've done some apps on iPhone using Objevtive-C and Cocos2d, and I'd like to start learning 3D. My first goal is to make a very simple app that: - Displays a 3D cube in the center of the screen. - And move the camera around the cube I want something very simple: no texture, no background. Where should I start to be able to do this app? I'm searching for some tutorials or exemples. Thanks!

    Read the article

  • I get an "EXC_BAD_ACCESS" when I try to read a NSString...

    - by micropsari
    Hello ! This is a (very) simplified version of my iPhone code : @interface x { NSString * name1; NSString * name2; } -init { name1 = @""; name2 = @""; } -(void) a { name1 = @"uhuh"; name2 = [foo bar]; // return a (NSString *) } -(void) b { NSLog(@"%@", name1); // it works NSLog(@"%@", name2); // there I get an EXC_BAD_ACCESS... } Why I have this problem ? And how can I solve it ? Thanks !

    Read the article

  • Draw points in a view on iPhone screen?

    - by micropsari
    Hello, in my class I have an attribute IBOutlet UIImageView *imageView; And if I want to draw an image in this view I do : imageView.image = [UIImage imageNamed:@"foo.png"]; But how can I do to draw some points with coordinate x, y (in pixel) directly in the view ? Thanks !

    Read the article

  • Distance between a line and a point in Objective-C ?

    - by micropsari
    Hello, I have 2 class : // point : (x, y) @interface ICPoint : NSObject { NSInteger x; NSInteger y; } // line : y= ax + b @interface ICLine : NSObject { float a; float b; } and this method: // return the distance between a line and a point -(NSInteger) distance:(ICPoint *)point { return fabs(-a*point.x +point.y - b) / sqrt(a*a + 1); } The formula seems right (based on wikipedia), but the results are wrong... why ? Thanks !

    Read the article

1