mirror of https://github.com/axmolengine/axmol.git
issue #2087: [dispatcher] Removing unused codes.
This commit is contained in:
parent
3fa539081f
commit
cdcfda1f2c
|
@ -1,51 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CCACCELEROMETER_DELEGATE_H__
|
||||
#define __CCACCELEROMETER_DELEGATE_H__
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
/**
|
||||
@brief The device accelerometer reports values for each axis in units of g-force
|
||||
*/
|
||||
class Acceleration
|
||||
{
|
||||
public:
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
|
||||
double timestamp;
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
Acceleration(): x(0), y(0), z(0), timestamp(0) {}
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
|
@ -1,58 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __PLATFORM_ANDROID_CCACCELEROMETER_H__
|
||||
#define __PLATFORM_ANDROID_CCACCELEROMETER_H__
|
||||
|
||||
#include "platform/CCCommon.h"
|
||||
#include "platform/CCAccelerometerDelegate.h"
|
||||
#include <functional>
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class Accelerometer
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
Accelerometer();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Accelerometer();
|
||||
|
||||
void setDelegate(std::function<void(Acceleration*)> function);
|
||||
void setAccelerometerInterval(float interval);
|
||||
void update(float x, float y, float z, long sensorTimeStamp);
|
||||
|
||||
private:
|
||||
std::function<void(Acceleration*)> _function;
|
||||
Acceleration _accelerationValue;
|
||||
};
|
||||
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* Accelerometer.h
|
||||
*
|
||||
* Created on: Aug 9, 2011
|
||||
* Author: laschweinski
|
||||
*/
|
||||
|
||||
#ifndef CCACCELEROMETER_H_
|
||||
#define CCACCELEROMETER_H_
|
||||
|
||||
#include "platform/CCAccelerometerDelegate.h"
|
||||
#include <functional>
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class Accelerometer
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
Accelerometer(){}
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Accelerometer(){}
|
||||
|
||||
static Accelerometer* sharedAccelerometer() { return NULL; };
|
||||
|
||||
void removeDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void addDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void setDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void setAccelerometerInterval(float interval) {CC_UNUSED_PARAM(interval);};
|
||||
};
|
||||
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif /* CCACCELEROMETER_H_ */
|
|
@ -1,52 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __PLATFORM_IPHONE_CCACCELEROMETER_H__
|
||||
#define __PLATFORM_IPHONE_CCACCELEROMETER_H__
|
||||
|
||||
#include <functional>
|
||||
#include "platform/CCAccelerometerDelegate.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class Accelerometer
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
Accelerometer();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Accelerometer();
|
||||
|
||||
void setDelegate(std::function<void(Acceleration*)> function);
|
||||
void setAccelerometerInterval(float interval);
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
|
@ -1,39 +0,0 @@
|
|||
/*
|
||||
* Accelerometer.h
|
||||
*
|
||||
* Created on: Aug 9, 2011
|
||||
* Author: laschweinski
|
||||
*/
|
||||
|
||||
#ifndef CCACCELEROMETER_H_
|
||||
#define CCACCELEROMETER_H_
|
||||
|
||||
#include "platform/CCAccelerometerDelegate.h"
|
||||
#include <functional>
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class Accelerometer
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
Accelerometer(){}
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Accelerometer(){}
|
||||
|
||||
static Accelerometer* sharedAccelerometer() { return NULL; };
|
||||
|
||||
void removeDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void addDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void setDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void setAccelerometerInterval(float interval) {CC_UNUSED_PARAM(interval);};
|
||||
};
|
||||
|
||||
}//namespace cocos2d
|
||||
|
||||
#endif /* CCACCELEROMETER_H_ */
|
|
@ -1,49 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __PLATFORM_MAC_CCACCELEROMETER_H__
|
||||
#define __PLATFORM_MAC_CCACCELEROMETER_H__
|
||||
|
||||
#include <functional>
|
||||
#include "platform/CCAccelerometerDelegate.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CC_DLL Accelerometer
|
||||
{
|
||||
public:
|
||||
Accelerometer() {}
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Accelerometer() {}
|
||||
|
||||
void setDelegate(std::function<void(Acceleration*)> function) { CC_UNUSED_PARAM(function); }
|
||||
void setAccelerometerInterval(float interval) {CC_UNUSED_PARAM(interval);};
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
|
@ -1,56 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013 The Chromium Authors
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __CCACCELEROMETER_H__
|
||||
#define __CCACCELEROMETER_H__
|
||||
|
||||
#include "platform/CCAccelerometerDelegate.h"
|
||||
#include <functional>
|
||||
|
||||
namespace cocos2d {
|
||||
|
||||
class Accelerometer
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
Accelerometer(){}
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Accelerometer(){}
|
||||
|
||||
static Accelerometer* sharedAccelerometer() { return NULL; };
|
||||
|
||||
void removeDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void addDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void setDelegate(std::function<void(Acceleration*)> function) {CC_UNUSED_PARAM(function);};
|
||||
void setAccelerometerInterval(float interval) {CC_UNUSED_PARAM(interval);};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* __CCACCELEROMETER_H__ */
|
|
@ -1,56 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010 cocos2d-x.org
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __PLATFORM_WIN32_UIACCELEROMETER_H__
|
||||
#define __PLATFORM_WIN32_UIACCELEROMETER_H__
|
||||
|
||||
#include "platform/CCAccelerometerDelegate.h"
|
||||
#include <functional>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CC_DLL Accelerometer
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
Accelerometer();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
~Accelerometer();
|
||||
|
||||
void setDelegate(std::function<void(Acceleration*)> function);
|
||||
void setAccelerometerInterval(float interval);
|
||||
void update( double x,double y,double z,double timestamp );
|
||||
private:
|
||||
Acceleration _accelerationValue;
|
||||
std::function<void(Acceleration*)> _function;
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue