mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7394 from Dhilan007/v3-gc-annotation
Add annotation for Controller class.
This commit is contained in:
commit
a0b16a29d1
|
@ -41,6 +41,9 @@ class EventDispatcher;
|
||||||
class Controller
|
class Controller
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Controllers' standard key
|
||||||
|
* Controller receives only standard key which contained within enum Key by default.
|
||||||
|
*/
|
||||||
enum Key
|
enum Key
|
||||||
{
|
{
|
||||||
JOYSTICK_LEFT_X = 1000,
|
JOYSTICK_LEFT_X = 1000,
|
||||||
|
@ -87,9 +90,17 @@ public:
|
||||||
static const int TAG_UNSET = -1;
|
static const int TAG_UNSET = -1;
|
||||||
|
|
||||||
static const std::vector<Controller*>& getAllController(){ return s_allController;}
|
static const std::vector<Controller*>& getAllController(){ return s_allController;}
|
||||||
|
/** Gets a controller with its tag
|
||||||
|
* @param tag An identifier to find the controller.
|
||||||
|
*/
|
||||||
static Controller* getControllerByTag(int tag);
|
static Controller* getControllerByTag(int tag);
|
||||||
|
/** To start discovering new controllers
|
||||||
|
* @warning The API only work on the IOS platform.Empty implementation on Android
|
||||||
|
*/
|
||||||
static void startDiscoveryController();
|
static void startDiscoveryController();
|
||||||
|
/** End the discovery process
|
||||||
|
* @warning The API only work on the IOS platform.Empty implementation on Android
|
||||||
|
*/
|
||||||
static void stopDiscoveryController();
|
static void stopDiscoveryController();
|
||||||
|
|
||||||
const std::string& getDeviceName() const { return _deviceName;}
|
const std::string& getDeviceName() const { return _deviceName;}
|
||||||
|
@ -108,7 +119,15 @@ public:
|
||||||
*/
|
*/
|
||||||
void receiveExternalKeyEvent(int externalKeyCode,bool receive);
|
void receiveExternalKeyEvent(int externalKeyCode,bool receive);
|
||||||
|
|
||||||
|
/** Changes the tag that is used to identify the controller easily.
|
||||||
|
* @param tag A integer that identifies the controller.
|
||||||
|
*/
|
||||||
void setTag(int tag) { _controllerTag = tag;}
|
void setTag(int tag) { _controllerTag = tag;}
|
||||||
|
/**
|
||||||
|
* Returns a tag that is used to identify the controller easily.
|
||||||
|
*
|
||||||
|
* @return An integer that identifies the controller.
|
||||||
|
*/
|
||||||
int getTag() const { return _controllerTag;}
|
int getTag() const { return _controllerTag;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue