Вопрос

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.

Это было полезно?

Решение

The method is this...

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

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top