diff --git a/cocos2dx/support/component/CCComponent.cpp b/cocos2dx/support/component/CCComponent.cpp index 6692c7ea0d..3dd331f1de 100644 --- a/cocos2dx/support/component/CCComponent.cpp +++ b/cocos2dx/support/component/CCComponent.cpp @@ -87,7 +87,7 @@ void CCComponent::setOwner(CCNode *pOwner) m_pOwner = pOwner; } -bool CCComponent::isEnabled() +bool CCComponent::isEnabled() const { return m_bEnabled; } diff --git a/cocos2dx/support/component/CCComponent.h b/cocos2dx/support/component/CCComponent.h index fd0bfd3b17..69b5bd86e5 100644 --- a/cocos2dx/support/component/CCComponent.h +++ b/cocos2dx/support/component/CCComponent.h @@ -41,7 +41,7 @@ public: virtual void onExit(); virtual void update(float delta); virtual void serialize(void* r); - virtual bool isEnabled(); + virtual bool isEnabled() const; virtual void setEnabled(bool b); static CCComponent* create(void); diff --git a/cocos2dx/support/component/CCComponentContainer.cpp b/cocos2dx/support/component/CCComponentContainer.cpp index 61b2afda5c..1a60c25f33 100644 --- a/cocos2dx/support/component/CCComponentContainer.cpp +++ b/cocos2dx/support/component/CCComponentContainer.cpp @@ -139,7 +139,7 @@ void CCComponentContainer::visit(float fDelta) } } -bool CCComponentContainer::isEmpty() +bool CCComponentContainer::isEmpty() const { return (bool)(!(m_pComponents && m_pComponents->count())); } diff --git a/cocos2dx/support/component/CCComponentContainer.h b/cocos2dx/support/component/CCComponentContainer.h index f2b38c71ff..91d09109ab 100644 --- a/cocos2dx/support/component/CCComponentContainer.h +++ b/cocos2dx/support/component/CCComponentContainer.h @@ -45,7 +45,7 @@ public: virtual void removeAll(); virtual void visit(float fDelta); public: - bool isEmpty(); + bool isEmpty() const; private: void alloc(void); diff --git a/extensions/Components/CCComAudio.cpp b/extensions/Components/CCComAudio.cpp index 46d05f96c8..2d2798565e 100644 --- a/extensions/Components/CCComAudio.cpp +++ b/extensions/Components/CCComAudio.cpp @@ -52,7 +52,7 @@ void CCComAudio::onExit() stopAllEffects(); } -bool CCComAudio::isEnabled() +bool CCComAudio::isEnabled() const { return m_bEnabled; } diff --git a/extensions/Components/CCComAudio.h b/extensions/Components/CCComAudio.h index 958fb65c22..317f102031 100644 --- a/extensions/Components/CCComAudio.h +++ b/extensions/Components/CCComAudio.h @@ -40,7 +40,7 @@ public: virtual bool init(); virtual void onEnter(); virtual void onExit(); - virtual bool isEnabled(); + virtual bool isEnabled() const; virtual void setEnabled(bool b); static CCComAudio* create(void); diff --git a/extensions/Components/CCComController.cpp b/extensions/Components/CCComController.cpp index e09ab09ccf..f51c8f06aa 100644 --- a/extensions/Components/CCComController.cpp +++ b/extensions/Components/CCComController.cpp @@ -52,7 +52,7 @@ void CCComController::update(float delta) { } -bool CCComController::isEnabled() +bool CCComController::isEnabled() const { return m_bEnabled; } diff --git a/extensions/Components/CCComController.h b/extensions/Components/CCComController.h index 9808eab1eb..c9c8c3254c 100644 --- a/extensions/Components/CCComController.h +++ b/extensions/Components/CCComController.h @@ -41,7 +41,7 @@ public: virtual void onEnter(); virtual void onExit(); virtual void update(float delta); - virtual bool isEnabled(); + virtual bool isEnabled() const; virtual void setEnabled(bool b); static CCComController* create(void); diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.cpp index d1479d06a7..65757a36ad 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.cpp @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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. -****************************************************************************/ - #include "EnemyController.h" #include "SceneController.h" diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.h b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.h index a354af05b5..e0f75a73d7 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.h +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/EnemyController.h @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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 __CC_ENEMYCONTROLLER_H__ #define __CC_ENEMYCONTROLLER_H__ diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/GameOverScene.h b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/GameOverScene.h index a9ef166ef2..bf9f93491e 100755 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/GameOverScene.h +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/GameOverScene.h @@ -1,28 +1,3 @@ -/**************************************************************************** - Copyright (c) 2010-2011 cocos2d-x.org - Copyright (c) 2010 Ray Wenderlich - - 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 _GAME_OVER_SCENE_H_ #define _GAME_OVER_SCENE_H_ diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.cpp index 8e07062d65..5a9dff6925 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.cpp @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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. -****************************************************************************/ - #include "PlayerController.h" #include "ComponentsTestScene.h" #include "SceneController.h" diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.h b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.h index f62ef5bf99..224bb49d78 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.h +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/PlayerController.h @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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 __CC_PLAYERCONTROLLER_H__ #define __CC_PLAYERCONTROLLER_H__ diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.cpp index 84ef53092a..d7d55d878e 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.cpp @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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. -****************************************************************************/ - #include "ProjectileController.h" #include "SceneController.h" #include "EnemyController.h" diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.h b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.h index 03109c9c1b..211b4614e3 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.h +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/ProjectileController.h @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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 __CC_PROJECTILECONTROLLER_H__ #define __CC_PROJECTILECONTROLLER_H__ diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.cpp b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.cpp index 4931cf587b..cbda418ad1 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.cpp +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.cpp @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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. -****************************************************************************/ - #include "SceneController.h" #include "ComponentsTestScene.h" #include "PlayerController.h" diff --git a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.h b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.h index 5c85a2b5cf..f1ef20530d 100644 --- a/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.h +++ b/samples/Cpp/TestCpp/Classes/ExtensionsTest/ComponentsTest/SceneController.h @@ -1,27 +1,3 @@ -/**************************************************************************** -Copyright (c) 2010-2013 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 __CC_SceneController_H__ #define __CC_SceneController_H__