Domanda

My ViewController.h:

@import UIKit;
@import SpriteKit;


@interface BGGameViewController : UIViewController

@property (nonatomic, weak) IBOutlet SKView *skView;
@property (nonatomic, weak) IBOutlet UIButton *finishGameButton;
@property (nonatomic, weak) IBOutlet UIButton *startNewGameButton;

- (IBAction)finishGame:(id)sender;
- (IBAction)startNewGame:(id)sender;

@end

But I don't know how to make update method to be called.

È stato utile?

Soluzione

The method is this...

- (void)update:(NSTimeInterval)currentTime
{
...
}

This needs to be in your SKScene class though, not your viewcontroller.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top