Inherits from SKScene
Conforms to KKSceneEventDelegate
SKPhysicsContactDelegate
Declared in KKScene.h

Overview

KKScene is the scene class used in Kobold Kit projects. KKScene updates the controllers and behaviors, receives and dispatches events (input, physics).

Properties

frameCount

The number of frames rendered since the start of the app. Useful if you need to lock your game’s update cycle to the framerate. For example this allows you to perform certain actions n frames from now, instead of n seconds.

@property (atomic) NSUInteger frameCount

Return Value

The number of frames rendered since the start of the app. Useful if you need to lock your game’s update cycle to the framerate. For example this allows you to perform certain actions n frames from now, instead of n seconds.

Declared In

KKScene.h

kkView

The view cast to a KKView object.

@property (atomic, readonly) KKView *kkView

Return Value

The view cast to a KKView object.

Declared In

KKScene.h

Instance Methods

addInputEventsObserver:

Registers a class as generic input receiver. Implement the usual input event methods on the receiver. Note: this is a preliminary, inefficient system. It will eventually be replaced.

- (void)addInputEventsObserver:(id)observer

Parameters

observer

Any object that implements touch, mouse, or other input events.

Declared In

KKScene.h

addPhysicsContactEventsObserver:

Adds a physics contact event observer.

- (void)addPhysicsContactEventsObserver:(id<KKPhysicsContactEventDelegate>)observer

Parameters

observer

The receiver of scene events.

Declared In

KKScene.h

addSceneEventsObserver:

Adds a scene event observer.

- (void)addSceneEventsObserver:(id)observer

Parameters

observer

The receiver of scene events.

Declared In

KKScene.h

dumpSceneGraph:

Dumps the scene graph to a string.

- (NSString *)dumpSceneGraph:(KKSceneGraphDumpOptions)options

Parameters

options

Determines what will be included in the dump.

Return Value

A string containing the textual dump of the scene graph.

Declared In

KKScene.h

isEqualToScene:

- (BOOL)isEqualToScene:(KKScene *)scene

isEqualToSceneProperties:

- (BOOL)isEqualToSceneProperties:(KKScene *)scene

isEqualToSceneTree:

- (BOOL)isEqualToSceneTree:(KKScene *)scene

removeInputEventsObserver:

Unregisters a class as generic input receiver.

- (void)removeInputEventsObserver:(id)observer

Parameters

observer

An object that was previously registered as input receiver.

Declared In

KKScene.h

removePhysicsContactEventsObserver:

Removes a physics contact event observer.

- (void)removePhysicsContactEventsObserver:(id<KKPhysicsContactEventDelegate>)observer

Parameters

observer

The receiver of scene events.

Declared In

KKScene.h

removeSceneEventsObserver:

Removes a scene event observer.

- (void)removeSceneEventsObserver:(id)observer

Parameters

observer

The receiver of scene events.

Declared In

KKScene.h