Kobold2D
1.1
Kobold2D API Reference (iOS version) for Kobold2D developers
|
#import "cocos2d.h"
#import "cocos2d-extensions.h"
#import "KKAcceleration.h"
#import "KKRotationRate.h"
#import "KKDeviceMotion.h"
#import "KKTouches.h"
#import "KKInputGesture.h"
enum KKKeyCode |
The virtual key codes for all keyboard keys, including modifier keys like Control, Command, Shift, etc.
enum KKModifierFlag |
The modifier flags (bits) for special keyboard keys, like Shift, Control, Option, Command, Function, Help, etc.
enum KKMouseButtonCode |
The "virtual keyCodes" for mouse buttons. These are left, right and other. The "other" buttons may include multiple keys which, if supported by the hardware and driver, you can identify with kKKMouseButtonOther and an optional offset, eg "kKKMouseButtonOther + 2" for a fifth mouse button. Note that any of the "other" mouse buttons are non-standard and typically require non-Apple mice to work. You can not rely on any of the "other" buttons being available at all.
Mouse double-clicks are an offset (kKKMouseButtonDoubleClickOffset) to the button codes. Double-clicks are treated as separate buttons by KKInput for your convenience, ie you don't have to test for two consecutive mouse button presses.
enum KKTouchPhase |
A touch can have just began, it can be moving, or it can be ended this frame. The kKKTouchPhaseAny can be used if want to include all three phases in a touch test. The KKTouchPhase enum values are equal to those in the UITouchPhase enum, that means they can be used interchangeably.